Cannot insert duplicate key in object 'dbo.__MigrationLog'.

Hello,
I am getting " Cannot insert duplicate key in object 'dbo.__MigrationLog'." when I try to do a import and generate script.  I created the db from SQL Automations, compiled my two views and one proc (all three are alters) and then push the Import and Mirgration.  Not sure how to resolve?  
Thank you!
-Tom

Answers

  • The error log shows:
    # Beginning transaction
    # Truncating __SchemaSnapshot
    Msg 2627, Level 14, State 1, Server D1710506, Line 31
    Violation of PRIMARY KEY constraint 'PK___MigrationLog'. Cannot insert duplicate key in object 'dbo.__MigrationLog'. The duplicate key value is (26e3ec02-1b1f-5dcd-81ad-f3edf77adf73, 2020-02-26 13:55:27.0803087, 91FC73CFB749BE9865D9B9CFDBA4ACE569BE35FB93524AC709503F247B5E7366).
  • Please close/delete, resolved somehow, not sure how but got changes back in our source control.
Sign In or Register to comment.