You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Nikita Timofeev (JIRA)" <ji...@apache.org> on 2016/11/24 12:50:58 UTC

[jira] [Assigned] (CAY-2154) Migrate db: queries order

     [ https://issues.apache.org/jira/browse/CAY-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikita Timofeev reassigned CAY-2154:
------------------------------------

    Assignee: Nikita Timofeev

> Migrate db: queries order
> -------------------------
>
>                 Key: CAY-2154
>                 URL: https://issues.apache.org/jira/browse/CAY-2154
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Modeler
>    Affects Versions: 4.0.M4
>            Reporter: ana benko
>            Assignee: Nikita Timofeev
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)