Upgrading from old versions of migration scripts
Published 16 July 2015
Before installing SQL Source Control 5 or later
All repository users should update to SQL Source Control at the same time. Repositories with existing migration scripts need to be linked before updating to SQL Source Control 5 or later.
For each repository:
- Link SQL Source Control to the database repository and the related migrations repository.
- Use Get latest to update to the latest revision for each repository.
Migration script folders that aren't linked won't be available after you update SQL Source Control.
Upgrade existing scripts
After installing SQL Source Control 5 or later, existing migration scripts are displayed on the Commit tab for each repository. You won't be able to use them until they're upgraded.
This upgrade process only needs to be performed by one user per repository. All other repository users must then refresh the Commit tab.
The upgrade process may take a long time - it's proportional to the number of migration scripts to be upgraded, and can take two or three minutes per migration script. If you have a large number of existing migration scripts, we recommend that you wait until a suitable time before starting the upgrade process.
To upgrade existing migration scripts:
- In the SQL Source Control window, go to the Commit tab.
- Using the checkboxes, select all existing migration scripts.
- Enter a comment for the commit (eg Upgrade migration scripts to new format).
- Click commit.
The migration scripts now appear on the migrations tab, and you can use them with the new migrations feature.
What next?
To get started writing your own migration scripts, try this worked example.
For further support, or to give us feedback, please get in touch.