-
Notifications
You must be signed in to change notification settings - Fork 82
Description
It seems that the indexes generation is kinda bugged in some cases.
I have a special use case: I have a database that is half
manually generated and half with migrations.
When you create indexes (On a single field) manually in phpMyAdmin, they are named after the field.
Ex: field parent_id will generate the index parent_id
When you create indexes via migrations in laravel, they are named following a naming convention.
Ex: the migration line $table->index('parent_id'); on a table named module_module will generate the index name ''module_module_parent_id_index".
Your package seems to use the index name as the field on which to execute the index command.
So I have lines like that in my generated migration:
$table->index('module_module_parent_id_index');
And obviously that line fails because there is no field named module_module_parent_id_index.
it would be super cool if it could generate the proper index instructions ! =)