Skip to content

Commit

Permalink
fix: Update default charset and collation for mysql - EXO-75202
Browse files Browse the repository at this point in the history
With mysql 8.4, the default charset and collation are updated from UTF to UTF8MB4. In addition NVARCHAR is now deprecated and replaced by VARCHAR.
This commit adapt liquibase changes in order to apply this change.

Resolves Meeds-io/meeds#2564
  • Loading branch information
rdenarie authored and exo-swf committed Nov 21, 2024
1 parent 15b4a7c commit 6f651d3
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<property name="autoIncrement" value="false" dbms="oracle,postgresql"/>

<changeSet author="kudos" id="1.0.0-1">
<validCheckSum>ANY</validCheckSum>
<createTable tableName="ADDONS_KUDOS">
<column name="KUDOS_ID" type="BIGINT" autoIncrement="${autoIncrement}" startWith="1">
<constraints nullable="false" primaryKey="true" primaryKeyName="PK_ADDONS_KUDOS"/>
Expand All @@ -24,7 +25,7 @@
<column name="CREATED_DATE" type="BIGINT"/>
</createTable>
<modifySql dbms="mysql">
<append value=" ENGINE=INNODB CHARSET=UTF8 COLLATE utf8_general_ci"/>
<append value=" ENGINE=INNODB CHARSET=UTF8MB4 COLLATE utf8mb4_0900_ai_ci"/>
</modifySql>
</changeSet>

Expand Down Expand Up @@ -100,5 +101,10 @@
<changeSet author="kudos" id="1.0.0-9" dbms="hsqldb">
<createSequence sequenceName="SEQ_ADDONS_KUDOS_ID" startValue="1"/>
</changeSet>
<changeSet author="kudos" id="1.0.0-10" >
<sql dbms="mysql">
ALTER TABLE ADDONS_KUDOS CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
</sql>
</changeSet>

</databaseChangeLog>

0 comments on commit 6f651d3

Please sign in to comment.