Please sign in to comment.
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.
- Loading branch information...
Showing with 13 additions and 0 deletions.