Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-1925 Support Multiple Databases in OpenMRS Installation and Update
  3. TRUNK-2633

NEWSEQUENTIALID() can be only used in SQL Server DEFAULT expression for a column of type 'uniqueidentifier'

    Details

    • Complexity:
      Low

      Description

      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.

        Gliffy Diagrams

          Attachments

            Attachments-Category-Modification

              Activity

                People

                • Assignee:
                  sunbiz Saptarshi Purkayastha
                  Reporter:
                  sunbiz Saptarshi Purkayastha
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: