Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-5416

Migration from 3.2.1 to 3.3.0 doesn't work on MSSQL due to constraint violation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 3.3.0.CR1
    • Fix Version/s: 3.3.0.Final, 3.4.0.CR1
    • Component/s: None
    • Labels:
      None
    • Docs QE Status:
      NEW
    • QE Status:
      VERIFIED

      Description

      Migrating from 3.2.1.Final to 3.3.0.CR1 fails on MSSQL db with below error:

      [org.keycloak.connections.jpa.updater.liquibase.conn.DefaultLiquibaseConnectionProvider] (ServerService Thread Pool – 54) Change Set META-INF/jpa-changelog-3.2.0.xml::3.2.0-fix::keycloak failed. Error: The index 'IDX_CLIENT_INIT_ACC_REALM' is dependent on column 'REALM_ID'. [Failed SQL: ALTER TABLE [dbo].[CLIENT_INITIAL_ACCESS] ALTER COLUMN [REALM_ID] [varchar](36) NOT NULL]: liquibase.exception.DatabaseException: The index 'IDX_CLIENT_INIT_ACC_REALM' is dependent on column 'REALM_ID'. [Failed SQL: ALTER TABLE [dbo].[CLIENT_INITIAL_ACCESS] ALTER COLUMN [REALM_ID] [varchar](36) NOT NULL]

      If I connect to the db and manually drop the index, alter the column and create the index again than everything goes smoothly.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hmlnarik Hynek Mlnařík
              Reporter:
              ouzklcn Oguz Kilcan (Inactive)
              Tester:
              Vlasta Ramik Vlasta Ramik
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: