Static Scripts

Static scripts are normally stored in your version control system and are referenced via a relative path in the deployment section of your template definition. They allow you to trigger the inclusion of these static scripts and various points in the execution of the deployment scripts. Typically they are used to disable and enable constraints so that data integrity is verified after execution of a script or set of scripts. DATASTAR runs all changes under a transaction therefore any failure will rollback the changes including any disabled constraints.

Automatic Reversal Feature

When using the automatic reversal feature your static scripts should be annotated with a metadata tag so that it can be identified as a static script. In this case it won't attempt to create a reversal script but will just include it unchanged in the reversal scripts.

-- Metadata: {"static":"true"}
ALTER TABLE [TABLE_A] NOCHECK CONSTRAINT ALL
ALTER TABLE [TABLE_B] NOCHECK CONSTRAINT ALL