Skip to Content

DDL Generation Issue

Using PowerDesigner version 15.2. I am generating individual create scripts for each database object. For tables and views, everything works as expected. Individual scripts are created with the name of the object and appropriate DDL. However, for the foreign key scripts (which are generated independent of the create table), the individual scripts are empty and all the foreign key contraints appear in the single mandatory file that must always be specified. Appears to be a bug. Would appreciate any feedback.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 12, 2015 at 09:02 PM

    Hi Monique,

    I am unclear about 'the individual scripts are empty'. However, the foreign key scripts being generated in one file is expected behavior.

    Using PD 16.5.4 and 15.3.0, if I select to generate the FKs outside the table and I select the option to generate multiple files:

    each table and view is created in its own .SQl file

    there is one SQL file that contains the drop statements, the read statements to open the individual create table\view SQL files and then the alter statements to create the Foreign keys.

    If I select to generate the FKs inside the table and I select the option to generate multiple files:

    - each table and view is created in its own .SQL file

    - the table SQL files include the syntax for the FK constraints

    - there is one SQL file that contains the drop statements, the read statements to open the individual create table SQL files. However, the tables are ordered so that the parent table is created before the child table.

    In both scenarios, this insures that the table(s) referenced by the FK constraints exist in the database before the FK statements are executed. Otherwise, a SQL error would occur if the table did not already exist in the database.

    Anthony

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Anthony,

      Thanks so much for the update. I am glad this will be fixed. I did not think I'd be able to take advantage of the fix, so not much of a surprise there. Perhaps I will be able to upgrade at some point. I do have a valid version 16 license retrieved from the old Sybase license server (an unused standalone license). Unfortunately, I have not been able to determine a way to get the software to go with it. If you have any suggestions that would be most appreciated.

      Thanks so much for your help!

      ~ Monique