Skip to content

Commit

Permalink
fix: Resolve MSSQL compatibility issue (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
anarsultanov authored Jan 24, 2024
1 parent d461384 commit 59a93ba
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,31 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd">

<changeSet id="20221217-2113-1" author="keycloak-multi-tenancy">
<validCheckSum>9:67461c052122d9a10facfc2967580aee</validCheckSum>
<createTable tableName="TENANT">
<column name="ID" type="VARCHAR(36)">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="NAME" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="REALM_ID" type="VARCHAR(255)">
<column name="REALM_ID" type="VARCHAR(36)">
<constraints nullable="false"/>
</column>
</createTable>
<addUniqueConstraint columnNames="NAME,REALM_ID" constraintName="UQ_TENANT_NAME_REALM_ID" tableName="TENANT"/>
</changeSet>

<changeSet id="20221217-2113-2" author="keycloak-multi-tenancy">
<validCheckSum>9:1ba9d4ecfa48929e5198c3a9e1947dd7</validCheckSum>
<createTable tableName="TENANT_MEMBERSHIP">
<column name="ID" type="VARCHAR(36)">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="TENANT_ID" type="VARCHAR(255)">
<column name="TENANT_ID" type="VARCHAR(36)">
<constraints nullable="false"/>
</column>
<column name="USER_ID" type="VARCHAR(255)">
<column name="USER_ID" type="VARCHAR(36)">
<constraints nullable="false"/>
</column>
</createTable>
Expand Down Expand Up @@ -76,4 +78,10 @@
<addForeignKeyConstraint baseColumnNames="TENANT_INVITATION_ID" baseTableName="TENANT_INVITATION_ROLE"
constraintName="FK_TENANT_INVITATION_ROLE_TENANT_INVITATION_ID" referencedColumnNames="ID" referencedTableName="TENANT_INVITATION"/>
</changeSet>

<changeSet id="20221217-2113-4" author="keycloak-multi-tenancy">
<modifyDataType tableName="TENANT" columnName="REALM_ID" newDataType="VARCHAR(36)"/>
<modifyDataType tableName="TENANT_MEMBERSHIP" columnName="TENANT_ID" newDataType="VARCHAR(36)"/>
<modifyDataType tableName="TENANT_MEMBERSHIP" columnName="USER_ID" newDataType="VARCHAR(36)"/>
</changeSet>
</databaseChangeLog>

0 comments on commit 59a93ba

Please sign in to comment.