Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Wrong Index generation #37

Open
YannPl opened this issue Jan 18, 2016 · 0 comments
Open

[Bug] Wrong Index generation #37

YannPl opened this issue Jan 18, 2016 · 0 comments

Comments

@YannPl
Copy link

YannPl commented Jan 18, 2016

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 ! =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant