Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
2.4.0
-
None
Description
ALTER TABLE grouper_message ADD CONSTRAINT fk_message_from_member_id FOREIGN KEY (from_member_id) REFERENCES grouper_members (id);
|
Column grouper_message.from_member_id is VARCHAR(100). But it is a foreign key to grouper_members.id, which is VARCHAR(40). Creating the foreign key only causes an error in MS SQL that I know of, which possibly nobody is using. In other databases, it creates the foreign key without issues. With the foreign key constraint, the data can never be more than 40 characters, so it is harmless to change it from 100 to 40.
I queried all the FK constraints, and this was the only one with a mismatch in type or size.