Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-106

Long similar foreign key names are shortened to conflicting names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      In my generated sql for Oracle, i find the following two conflicting statements:

      ALTER TABLE doc_permission_sets
      ADD CONSTRAINT doc_permission_ermission_sets FOREIGN KEY (set_id) REFERENCES permission_sets (set_id);

      and

      ALTER TABLE doc_permission_sets_ex
      ADD CONSTRAINT doc_permission_ermission_sets FOREIGN KEY (set_id) REFERENCES permission_sets (set_id);

      The tables have similar names, and the foreign key names conflict.

      Oracle gives the following error when trying to run the sql:

      ORA-02264: name already used by an existing constraint

      Maybe SqlBuilder.shortenName() could use some kind of counter for conflicting names?

      Attachments

        Activity

          People

            tomdz Thomas Dudziak
            kreiger Christoffer Hammarström
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: