SQL Source Control 6

Error validating migration scripts

You may encounter a validation error when committing migration scripts. This page gives you more information about why the error has happened, and what you can do to fix the problem.

Why has this happened?

When you commit a migration script, we validate your repository to make sure that we'll be able to deploy it. If validation fails, the migration script cannot be committed.

Why does validation fail?

When you merge multiple branches together that contain migration scripts, validation can fail.

When you commit a migration script, we store the state of your database before the migration script is created. After a merge, it's not possible to know what the correct state should be. We store the merge result as the state of the database, but sometimes this is incompatible with the changes you've made.

What can I do?

We need to change the state we've stored for some of the existing migration scripts in your repository.

These steps may fix the problem:

  1. Delete the most recent migration script from your repository.
  2. Commit the deletion.
  3. Create a new migration script with the same content as the deleted migration script. Make sure that this migration script still runs on your database.
  4. Commit this new migration script.
  5. Commit the migration script which caused the error.

If validation still fails, contact support@red-gate.com.


Didn't find what you were looking for?