1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test
Prathamesh Sonpatki 7ba08037f8
Add support for if_not_exists to indexes
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]
2020-03-29 10:30:01 -04:00
..
active_record/connection_adapters Deduplicate various Active Record schema cache structures 2019-06-03 13:31:42 +02:00
assets
cases Add support for if_not_exists to indexes 2020-03-29 10:30:01 -04:00
fixtures Allow AR::Enum definitions with boolean values 2019-12-24 07:05:42 -10:00
migrations Fix occurrences Fixnum|Bignum 2018-03-04 20:44:30 +02:00
models Support strict_loading on association declarations 2020-02-21 13:11:24 -05:00
schema Merge pull request #37627 2020-02-10 01:00:30 +01:00
support Merge pull request #38401 from vinistock/stop_stringifying_during_attribute_assignment 2020-02-13 16:54:35 -05:00
config.example.yml Respect ENV variables when finding DBs etc for the test suite 2019-02-06 01:20:06 +10:30
config.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00