Working with migration scripts
Published 18 February 2016
As of SQL Source Control v7, using migrations scripts in SQL Change Automation is the recommended and supported method for implementing a migrations based deployment approach as part of Redgate's Database DevOps solution.
If you are using the legacy SQL Source Control migrations feature (via the Migrations tab in SQL Source Control)...
- Read about setting a SQL Source Control project as the source for a SQL Change Automation project, which allows you to deploy changes via migrations
- If you would like help and advice on how to migrate to SQL Change Automation migrations, please contact support
Interested in previewing a new solution which will offer a single flexible development model in one tool?
Email databasedevops@red-gate.com for more info.
What are migration scripts?
When using a state approach, to deploy changes from version control the SQL Compare engine calculates a deployment script by comparing the state held in version control with the deployment target. If more control or customization of the deployment scripts is required, you can use the migration scripts capability of SQL Change Automation to achieve this.
For example, migration scripts may be necessary to avoid data loss when making certain schema changes.
To get started with migrations, a SQL Change Automation project must be created and configured with its development source set to your SQL Source Control project.