Closed hlorofos closed 2 years ago
Thanks for the post. I got stuck on the same issue. Changing "plan_subscription_schedules" to "subscription_schedules" resolved the issue. This was on MariaDB 10.6.7
Hello, It has a name to make it shorter "unique_plan_subscription_keys", but maybe mariaDB does not support it.
Found that the bug was not the unique index but in $table->morphs('scheduleable');
. v7 fixes many migration errors :+1:
Hi @bpuig Still the same issue here after updating to v7.0 I fixed it by renaming my tables in config as bellow :
'tables' => [
'plans' => 'plans',
'plan_combinations' => 'p_combinations',
'plan_features' => 'p_features',
'plan_subscriptions' => 'p_subscriptions',
'plan_subscription_features' => 'p_subscription_features',
'plan_subscription_schedules' => 'p_subscription_schedules',
'plan_subscription_usage' => 'p_subscription_usage',
],
Then maybe you should check this: https://laravel.com/docs/9.x/migrations#index-lengths-mysql-mariadb If that fixes your issue maybe I can add it to the docs.
@bpuig Yes that's the problem
Just add Schema::defaultStringLength(191);
Thanks
The following migration with default table settings producing MySQL error:
Workaround is to edit default table name in config/shubby.php to a shorter one.