Search code examples
visual-studioredgate

ReadyRoll Project: Migration ID Duplicate


The Migration ID in this script file duplicates that of another migration. To assign a unique ID to the migration, open the file in Visual Studio, remove the Migration tag, save and click 'Insert Metadata'.

I am trying to build a readyroll project, but i got this error. I am unable to see the 'Insert Metadata' option in VS.


Solution

  • You should see a button to insert metadata if you open the script and remove the first line of the file (which begins with -- <Migration) and save the script:

    enter image description here

    If the button does not appear, then you can manually replace the migration metadata with a new unique ID, for example:

    -- <Migration ID="af207303-9c4f-4543-8303-704b5f4beaf1" /> GO PRINT 'Hello world'; GO

    The project should build successfully after making these changes.