-
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:Low
The liquibase-update-to-latest uses NEWSEQUENTIALID() to generate UUID in SQL Server. This is not allowed in SQL Server as UUID generation method can only be used in the CREATE TABLE or ALTER TABLE syntax on a column of type 'UNIQUEIDENTIFIER'. Thus the following error is thrown when trying to run UUID generating changesets:
Error executing SQL UPDATE [dbo].[cohort] SET [uuid] = NEWSEQUENTIALID() WHERE uuid is null java.sql.SQLException: The newsequentialid() built-in function can only be used in a DEFAULT expression for a column of type 'uniqueidentifier' in a CREATE TABLE or ALTER TABLE statement. It cannot be combined with other operators to form a complex scalar expression.