7ba08037f8
When we try to create a table which already exists which also adds indexes, then the `if_not_exists` option passed to `create_table` is not extended to indexes. So the migration results into an error if the table and indexes already exist. This change extends the `if_not_exists` support to `add_index` so that if the migration tries to create a table which also has existing indexes, error won't be raised. Also as a side-effect individual `add_index` calls will also accept `if_not_exists` option and respect it henceforth. [Prathamesh Sonpatki, Justin George] |
||
---|---|---|
.. | ||
change_schema_test.rb | ||
change_table_test.rb | ||
column_attributes_test.rb | ||
column_positioning_test.rb | ||
columns_test.rb | ||
command_recorder_test.rb | ||
compatibility_test.rb | ||
create_join_table_test.rb | ||
foreign_key_test.rb | ||
helper.rb | ||
index_test.rb | ||
logger_test.rb | ||
pending_migrations_test.rb | ||
references_foreign_key_test.rb | ||
references_index_test.rb | ||
references_statements_test.rb | ||
rename_table_test.rb |