-
Type:
Sub-task
-
Status: Closed
-
Priority:
TBD
-
Resolution: Fixed
-
Affects Version/s: OpenMRS 1.9.0
-
Fix Version/s: OpenMRS 1.9.0
-
Component/s: Data Model
-
Complexity:Medium
Since there are IDENTITY columns in many tables, SQL Server prevents manual entry of ids into such columns. SQL Server provides SET IDENTITY_INSERT <tableName> ON for allowing inserting ids. Thus all insert statements done through liquibase needs to be checked and wrapped between:
SET IDENTITY_INSERT <tableName> ON; insert...; SET IDENTITY_INSERT <tableName> OFF;
Care should be taken to first check if there is an identity column in the table or else the SET IDENTITY_INSERT fails with exception.
This can be implemented through extensions in liquibase 2.0