Skip to content

addRecord is unable to insert values for primary key column on MS SQL Server #66

@tdm00

Description

@tdm00

If a migration contains an addRecord method that specifies a value for the table primary key on a SQL Server table the migration will fail.

To allow this the SQL statement has to be prefixed with the following code:

-- SET IDENTITY_INSERT to ON.
SET IDENTITY_INSERT dbo.Tool ON
GO

For more information see http://msdn.microsoft.com/en-us/library/ms188059.aspx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions