diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-11-26 09:58:24 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-11-26 10:03:55 +0100 |
commit | 6eba8d27e6feecca88303df6500ef6b376344e29 (patch) | |
tree | d84607e6b13721a4acd035a088a185b232bda0f3 /guides | |
parent | e4c0a225ae029af91d26735d8085a09d6d64859e (diff) | |
download | rails-6eba8d27e6feecca88303df6500ef6b376344e29.tar.gz rails-6eba8d27e6feecca88303df6500ef6b376344e29.tar.bz2 rails-6eba8d27e6feecca88303df6500ef6b376344e29.zip |
`rename_index`: add the new index before removing the old one.
This prevents the following error when a MySQL index on a foreign key
column is renamed:
```
ActiveRecord::StatementInvalid: Mysql2::Error: Cannot drop index 'index_engines_on_car_id': needed in a foreign key constraint: DROP INDEX `index_engines_on_car_id` ON `engines`
```
refs: #13038.
Diffstat (limited to 'guides')
0 files changed, 0 insertions, 0 deletions