Suggestion: Allow (or require) foreign keys to use BigInt even if the primary uses Integer
Many of us have older codebases with primary keys as integers, not bigint. ARD allows these exceptions until you get round to migrating them.
What we don't want is to allow the problem to propagate. I definitely don't want FKIDs to be integer when the primary is bigint, but I want to allow (force?) all new FKIDs to be be bigint regardless of the PKID type. This will the future big fix migration to concentrate on the primary tables only.
I am prepared to ignore for the (rare?, nearly impossible?) possibility of a very large number being put in the FKID column. That Shouldn't Happen.
Would you like a check for this, with the standard exceptions system for existing tables?
I think having a config option named like ignore_columns_with_larger_type for mismatched_foreign_key_type checker would be good.
Yes, it is really a problem when foreign key has a shorter type than a related primary key, but when it has a longer type - this is not much of a problem.
OK, will give it a go with a PR 👍 !
Thanks for reporting the problem, @hlascelles! I really like your idea! I think you can proceed with the PR.