Enable Migration/CreateTableWithForeignKeys DB rubocop rule
Summary
Enable Migration/CreateTableWithForeignKeys for future migrations
The following discussion from !40858 (merged) should be addressed:
-
@mayra-cabrera started a discussion: (+1 comment) Do we have a follow up to enable this cop?
Implementation plan
There are currently 32 migration files that do violate the cop. We should fix those violations and remove the exclude regex from .rubocop.yml
.
Note: We should create separate migration files to add already existing foreign keys so please use existing foreign key helpers which checks if the foreign key already exists.
Edited by Michael Becker