Automatic Reuse and Migration of Columns

When you create a reference, PowerDesigner can automatically:

  • Reuse an appropriate existing column in the child table as the foreign key column

  • Migrate the primary key column in the parent table to create a foreign key column in the child table

  1. Select Tools > Model Options to open the Model Options dialog box.
  2. Select the Reference sub-category in the left-hand Category pane to display the Reference tab.


  3. Specify your choices for column reuse and migration as follows:
    • To auto-reuse existing columns in child tables as foreign key columns when creating references - select the Auto-reuse columns check box. Note that the column in the child table must have the same code as the migrating primary key column, and cannot already be a foreign key column for it to be suitable for reuse. If you want to reuse a child table column that is already a foreign key column, you must do this manually from the Joins tab of the reference property sheet.

    • To auto-migrate primary key columns in parent tables for use as foreign key columns in child tables - select the Auto-migrate columns check box. This will also enable the column properties check boxes, allowing you to specify which of the parent column properties to migrate.

    • To auto-migrate the properties of parent table primary key columns - select the appropriate check boxes:

      • Domains

      • Check (check parameters)

      • Rules (business rules)

      • Last position (migrated columns should be added at the end of the table column list. If the Last position option is not selected, migrated columns are inserted between key columns and other columns which implies that a child table must be dropped and recreated each time you add a reference and modify an existing database.)

    Note that, during intermodel generation, whether or not the Auto-migrate columns check box is selected, any selected column property is migrated from the PK to the FK.

  4. Ensure that the Default link on creation option is set to Primary key.
  5. Click OK to close the Model Options dialog box.