mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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] |
||
---|---|---|
.. | ||
active_record/connection_adapters | ||
assets | ||
cases | ||
fixtures | ||
migrations | ||
models | ||
schema | ||
support | ||
config.example.yml | ||
config.rb |