diff options
author | eileencodes <eileencodes@gmail.com> | 2016-07-01 11:38:38 -0400 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2016-07-01 11:43:46 -0400 |
commit | 0d8d64e9d09cf37ae302fed17f5cd872b4053a4f (patch) | |
tree | e1acaed336fb260ddfcf34cd0d14c2fe991f3272 /activerecord/test/cases/finder_test.rb | |
parent | 4abd389ef77cf8f8b45793451c6d4429ca08062e (diff) | |
download | rails-0d8d64e9d09cf37ae302fed17f5cd872b4053a4f.tar.gz rails-0d8d64e9d09cf37ae302fed17f5cd872b4053a4f.tar.bz2 rails-0d8d64e9d09cf37ae302fed17f5cd872b4053a4f.zip |
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.
Diffstat (limited to 'activerecord/test/cases/finder_test.rb')
0 files changed, 0 insertions, 0 deletions