Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-1979

grouper_message.from_member_id varchar(100) should be varchar(40)

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 2.5.0
    • 2.4.0
    • grouperInstaller
    • 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.

      Attachments

        Activity

          People

            chad.redman@at.internet2.edu Chad Redman (unc.edu)
            chad.redman@at.internet2.edu Chad Redman (unc.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: