SET IDENTITY_INSERT for table fails when IDENTITY column doesn't exist

Description

The SET IDENTITY_INSERT <tableName> ON is done irrespective of checking if the insert is being made on a table which has an IDENTITY column. This results in the exception:

Thus, a check needs to be performed before appending the statements whether the table has IDENTITY column or not.

Environment

SQL Server 2008, Liquibase 2.0.1, liquibase-mssql v1.2.1-SNAPSHOT

Status

Assignee

Unassigned

Reporter

Saptarshi Purkayastha

Labels

Components

Priority

Blocker
Configure