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/cases/migration
eileencodes 7a9e88eee6
Add regression test for foreign key schema dump caching
If you had a foreign key set and then decided to add `on_delete:
:cascade` later in another migration that migration would run but
wouldn't refresh the schema dump.

The reason for this was because `create_table_info` caches the statement
and sets it to be the same as the original declaration for the foreign
key (without the `on_delete: :cascade`.

PR #25307 ended up fixing this bug because it removes the check for
`create_table_info` and relies on reading from `information_schema`. The
fix however was intended to patch another bug. The reason this fixes the
issue is we're no longer parsing the regex from the cached
`create_table_info`.

This regression test is to ensure that the issue does not return if we
for some reason go back to using `create_table_info` to set the foreign
keys.
2016-07-01 23:16:45 -03:00
..
change_schema_test.rb Remove legacy mysql adapter 2015-12-17 15:54:57 +00:00
change_table_test.rb no more require minitest mock 2015-08-27 02:14:30 +05:30
column_attributes_test.rb Support for unified Integer class in Ruby 2.4+ 2016-05-18 22:04:22 -07:00
column_positioning_test.rb Remove legacy mysql adapter 2015-12-17 15:54:57 +00:00
columns_test.rb Remove legacy mysql adapter 2015-12-17 15:54:57 +00:00
command_recorder_test.rb Removed mocha from Active Record Part 2 2015-09-16 21:57:10 +05:30
compatibility_test.rb Fix random failures of tests on Travis 2016-02-12 19:46:03 +05:30
create_join_table_test.rb add column type option to create_join_table to support uuid 2016-03-17 11:54:02 +01:00
foreign_key_test.rb Add regression test for foreign key schema dump caching 2016-07-01 23:16:45 -03:00
helper.rb tests, use if_exists: true instead of rescue nil. 2015-09-22 17:28:54 +02:00
index_test.rb Merge pull request #19456 from greysteil/index-exists-behaviour 2015-12-18 14:13:46 +10:30
logger_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
pending_migrations_test.rb no more require minitest mock 2015-08-27 02:14:30 +05:30
references_foreign_key_test.rb foreign_key respects table_name_prefix and table_name_suffix 2016-04-19 07:33:31 +09:00
references_index_test.rb Pare back default index option for the migration generator 2016-01-24 18:48:15 +05:30
references_statements_test.rb Add test to verify named unique index, when creating reference via add_reference 2016-04-16 20:44:08 +05:30
rename_table_test.rb Remove unnecessary enable,disable_extension on tests 2016-01-02 00:30:30 +09:00