• Y
    `rename_index`: add the new index before removing the old one. · 6eba8d27
    Yves Senn 提交于
    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.
    6eba8d27
schema_statements.rb 31.8 KB