Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2154

Migrate db: queries order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.M4
    • 4.0.M4
    • Modeler
    • None

    Description

      1. Reverse Engineer db, that has eg. Salary dbEntity
      2. Add eg. dept_id column to Salary
      3. Add new Dept dbEntity, add id column
      4. Join Salary and Dept entities by 1->many relationship. Save
      5. Migrate Db, view Generated SQL tab

      -> migrate first attempts to create FK, and only then adds new column
      ALTER TABLE testdb.salary ADD FOREIGN KEY (dept_id) REFERENCES dept (id);
      ALTER TABLE testdb.salary ADD COLUMN dept_id INT;
      which results in a error

      Attachments

        Issue Links

          Activity

            People

              ntimofeev Nikita Timofeev
              abenko ana benko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: