redgatesqlmigrations

Can I undo 'Mark as Deployed' option in ReadyRoll?


I marked 2 scripts as deployed and checked in my changes to TFS. Can I undo this in the ReadyRoll project?


Solution

  • When you click Mark as Deployed, ReadyRoll inserts a row into the [__MigrationLog] table within the target database in order to prevent the script from being re-executed.

    In order to undo this, simply delete the record from the target database, e.g.

    DELETE FROM [dbo].[__MigrationLog] WHERE script_filename = '0001_20161125-1446_username.sql'

    If you have many servers to undo 'mark as deployed':