How to Generate SQL DDL Change Scripts

Changes made in the data model can be transformed into the SQL DDL scripts. Software Ideas Modeler allows you to generate ALTER and DROP scripts for your changes in the data entities.

If you are working on long-term projects, you know that the database model needs to be updated to reflect the new requirements. SQL DDL script generator in Software Ideas Modeler allows you to generate change scripts for your data models.

If you want to generate a change script for your data model, you will need to enable the change tracking. You can do it from:

  • Ribbon / Review (tab) / Change Tracking (group) / Track Changes (button)
  • Menu / Tools / Change Tracking / Track Changes

Generate Change Scripts

Open your entity-relationship diagram and edit the data model in the diagram editor or use the Properties dialog to edit the desired entities. When your model update is completed, you can start the generation.

  • 1. Open Source Code Generation dialog (Ribbon / Process (tab) / Generation (group) / Source Code (button) or Menu / Tools / Generate Source Code).
  • 2. Choose SQL DDL in the Language drop-down
  • 3. Choose SQL DDL - Changes in the Template drop-down
  • 4. Choose the path where should be the generated script files saved using the Output directory box
  • 5. Click on the Generate button
Generate SQL DDL Change Script
Generate SQL DDL Change Script

New Changes Batch

If you want to generate a new change script with new changes from this point, you should accept the current changes using the button Accept Changes:

  • Ribbon / Review (tab) / Change Tracking (group) / Accept Changes (button)
  • Menu / Tools / Change Tracking / Accept Changes

SQL DDL Script Generation

Software Ideas Modeler allows you to generate various types of scripts to capture the changes in the data model. It includes:

  • CREATE - for new entities
  • ALTER - for changed entities
  • DROP - for removed entities
  • DELETE - for deleted data items
  • INSERT - for new data items

Video Tutorial

New Comment

Comment