Add database migration for username length change.

This commit is contained in:
Kavin 2023-10-26 17:39:25 +01:00
parent c1fde372a5
commit 024435ff54
No known key found for this signature in database
GPG key ID: 6E4598CA5C92C41F
2 changed files with 16 additions and 0 deletions

View file

@ -6,5 +6,6 @@
<include file="version/0-init.xml" relativeToChangelogFile="true"/>
<include file="version/1-fix-subs.xml" relativeToChangelogFile="true"/>
<include file="version/2-oidc.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet id="2-0" author="kavin" runInTransaction="false">
<!-- alter username's varchar length to 32 from 24 -->
<sql>ALTER TABLE users ALTER COLUMN username TYPE varchar(32);</sql>
<rollback>
<sql>ALTER TABLE users ALTER COLUMN username TYPE varchar(24);</sql>
</rollback>
</changeSet>
</databaseChangeLog>