Add version 7 with group tokens

This commit is contained in:
william 2022-04-25 22:05:59 -04:00
parent e9aa9e30bb
commit ea21e317f0
5 changed files with 50 additions and 2 deletions

View File

@ -5,7 +5,7 @@ version = "6.2"
plugins {
kotlin("jvm") version "1.6.20"
id("org.jetbrains.dokka") version "1.6.10"
id("org.jetbrains.dokka") version "1.6.20"
id("maven-publish")
id("com.github.johnrengelman.shadow") version "7.1.2"
}

5
config.properties Normal file
View File

@ -0,0 +1,5 @@
database.target-version=7
database.url=jdbc:mysql://172.19.0.2/
database.name=cre
database.username=root
database.password=pass

View File

@ -5,7 +5,7 @@ import java.io.FileInputStream
import java.util.*
/** The latest version of the database supported by the utility. The [DatabaseUpdaterProperties] target version cannot be higher than this. */
internal const val LATEST_DATABASE_VERSION = 6
internal const val LATEST_DATABASE_VERSION = 7
/** The key of the target version property */
internal const val PROPERTY_TARGET_VERSION = "database.target-version"

View File

@ -0,0 +1,29 @@
<?xml version="1.1" 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 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.9.xsd">
<changeSet id="1" author="william">
<createTable tableName="group_token">
<column name="id" type="binary(16)">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="varchar(255)">
<constraints nullable="false" unique="true"/>
</column>
<column name="is_valid" type="bit(1)" defaultValueBoolean="true">
<constraints nullable="false"/>
</column>
<column name="group_id" type="bigint">
<constraints nullable="false"/>
</column>
</createTable>
<createIndex tableName="default_group_token" indexName="ix_default_group_token_group_id">
<column name="group_id"/>
</createIndex>
<addForeignKeyConstraint baseColumnNames="group_id" baseTableName="default_group_token"
constraintName="fk_default_group_token_user_group_group_id"
referencedColumnNames="id" referencedTableName="user_group"/>
</changeSet>
</databaseChangeLog>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<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
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">
<include file="/changelogs/changelog.1.xml"/>
<include file="/changelogs/changelog.2.xml"/>
<include file="/changelogs/changelog.3.xml"/>
<include file="/changelogs/changelog.4.xml"/>
<include file="/changelogs/changelog.5.xml"/>
<include file="/changelogs/changelog.6.xml"/>
<include file="/changelogs/changelog.7.xml"/>
</databaseChangeLog>