What are the challenges you face when working across database platforms? Take the survey

Including RedGateLocal.DeploymentMetadata

We're using SQL Compare 13 to copy structures and data from a shared development instance.

We'd like to sync the [RedGateLocal].[DeploymentMetdata] table while doing this operation, so that SQL Source Control doesn't think there are migrations to be run that don't need to be run.

However, it seems this table is ignored by default and there doesn't seem to be a way to set up the project file to _not_ ignore it by default.


  • Options
    Hi @mattbehrens,

    You're able to mark a migration script as deployed from SQL Source Control under the Migrations tab, where you can expand the Existing migration scripts and find the latest migration script to mark it as deployed. Note the Name and  Id of the script and edit the following Insert statements, swapping out the MigrationName and MigrationId with Name and Id, respectively.
    <div><code>INSERT INTO [RedGateLocal].[DeploymentMetadata] ([Name], [Type], [Action], [BlockId], [MetadataVersion]) <br>VALUES (N'MigrationName', 'Compare', 'Deployed', 'MigrationId auto', 'manual')<br>INSERT INTO [RedGateLocal].[DeploymentMetadata] ([Name], [Type], [Action], [BlockId], [MetadataVersion])<br> VALUES (N'MigrationName', 'Migration', 'Deployed','MigrationId user', 'manual')

    Execute this SQL on the database you wish to have the migration script deployed on.
    SOC5/RedGateLocal.DeploymentMetadata Documentation

Sign In or Register to comment.