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 committed Nov 7, 2024
1 parent aad7acb commit 037e42d
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,27 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

<!-- Definition of MSG_DEVICES table -->
<changeSet author="push-notifications" id="1.0.0-1">
<validCheckSum>9:d8b93b8958add435081f72f023a0ccfb</validCheckSum>
<validCheckSum>9:b2e263d54f554c78747d2435d05de181</validCheckSum>
<createTable tableName="MSG_DEVICES">
<column name="ID" type="BIGINT" autoIncrement="${autoIncrement}" startWith="1">
<constraints nullable="false" primaryKey="true" primaryKeyName="PK_MSG_DEVICES" />
</column>
<column name="TOKEN" type="NVARCHAR(200)">
<column name="TOKEN" type="VARCHAR(200)">
<constraints nullable="false"/>
</column>
<column name="USERNAME" type="NVARCHAR(200)">
<column name="USERNAME" type="VARCHAR(200)">
<constraints nullable="false"/>
</column>
<column name="TYPE" type="NVARCHAR(200)">
<column name="TYPE" type="VARCHAR(200)">
<constraints nullable="true"/>
</column>
<column name="REGISTRATION_DATE" type="TIMESTAMP" defaultValueComputed="${now}">
<constraints nullable="false"/>
</column>
</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>
<changeSet author="push-notifications" id="1.0.0-2">
Expand All @@ -65,7 +67,12 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<changeSet author="push-notifications" id="1.0.0-4" dbms="hsqldb">
<createSequence sequenceName="SEQ_MSG_DEVICES_ID" startValue="1"/>
</changeSet>
<changeSet author="push-notifications" id="1.0.0-5">
<sql dbms="mysql">
ALTER TABLE MSG_DEVICES CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
</sql>
</changeSet>



</databaseChangeLog>
</databaseChangeLog>

0 comments on commit 037e42d

Please sign in to comment.