Closed
Description
What about add a method to the Schema class to check if an index exists?
It can be useful in migrations to avoid possible errors on adding/dropping indexes
I know a method on MySQL but I haven't experience with other DB engines.
I've found this informations to make this:
- MySQL: http://stackoverflow.com/questions/127156/how-do-i-check-if-index-exists-on-a-table-field-in-mysql
- SQL Server: http://stackoverflow.com/questions/2689766/how-do-you-check-if-a-certain-index-exists-in-a-table
- PostgreSQL: http://dba.stackexchange.com/questions/35616/create-index-if-it-does-not-exist
- SQLite: http://www.sqlite.org/pragma.html#pragma_index_info
Thoughts?
Metadata
Assignees
Labels
No labels