Skip to content

Commit

Permalink
[DAT-19188] Adding TiDB to Test Harness (#976)
Browse files Browse the repository at this point in the history
* DAT-19188 adding tidb
  • Loading branch information
Tamelianovych authored Jan 22, 2025
1 parent 708f291 commit df7e075
Show file tree
Hide file tree
Showing 107 changed files with 1,688 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/advanced.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:
default: "[\"mysql-5.6\",\"mysql-5.7\",\"mysql-8\",\"mysql-8.4\",\"postgres-12\",\"postgres-13\",\"postgres-14\",\"postgres-15\",\"postgres-16\",\"postgres-17\",\"mariadb-10.2\",\"mariadb-10.3\",\"mariadb-10.4\",\"mariadb-10.5\",\"mariadb-10.6\",
\"mariadb-10.7\",\"mssql-2017\",\"mssql-2019\",\"mssql-2022\",\"crdb-23.1\",\"crdb-23.2\",\"crdb-24.1\",\"percona-xtradb-cluster-5.7\",\"percona-xtradb-cluster-8.0\",
\"edb-edb-12\",\"edb-edb-13\",\"edb-edb-14\",\"edb-edb-15\",\"edb-edb-16\",\"db2-luw\",\"H2Database-2.2\",\"sqlite\",\"derby\",
\"firebird-3\",\"firebird-4\",\"hsqldb-2.4\",\"hsqldb-2.5\",\"diff\"]"
\"firebird-3\",\"firebird-4\",\"hsqldb-2.4\",\"hsqldb-2.5\",\"diff\",\"tidb\"]"

jobs:
check_build_safety:
Expand All @@ -53,7 +53,7 @@ jobs:
"postgres-12","postgres-13","postgres-14","postgres-15","postgres-16","postgres-17","mariadb-10.2","mariadb-10.3","mariadb-10.4","mariadb-10.5","mariadb-10.6",
"mariadb-10.7","mssql-2017","mssql-2019","mssql-2022","crdb-23.1","crdb-23.2","crdb-24.1","percona-xtradb-cluster-5.7","percona-xtradb-cluster-8.0",
"edb-edb-12","edb-edb-13","edb-edb-14","edb-edb-15","edb-edb-16","db2-luw","H2Database-2.2","sqlite","derby","firebird-3","firebird-4",
"hsqldb-2.4","hsqldb-2.5","diff"]' }}
"hsqldb-2.4","hsqldb-2.5","diff","tidb"]' }}
testClasses: ${{ 'AdvancedHarnessSuiteTest' }}
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ on:
"firebird-4",
"db2-luw",
"informix-12.10",
"informix-14.10"
"informix-14.10",
"tidb"
]
jobs:
Expand All @@ -123,7 +124,7 @@ jobs:
"postgres-12","postgres-13","postgres-14","postgres-15","postgres-16","postgres-17","mariadb-10.2","mariadb-10.3","mariadb-10.4","mariadb-10.5","mariadb-10.6",
"mariadb-10.7","mssql-2017","mssql-2019","mssql-2022","H2Database-2.2","crdb-23.1","crdb-23.2","crdb-24.1",
"edb-postgres-12","edb-postgres-13","edb-postgres-14","edb-postgres-15","edb-postgres-16",
"edb-edb-12","edb-edb-13","edb-edb-14","edb-edb-15","edb-edb-16","derby","sqlite","hsqldb-2.4","hsqldb-2.5","firebird-3","firebird-4","db2-luw","informix-12.10","informix-14.10"]' }}
"edb-edb-12","edb-edb-13","edb-edb-14","edb-edb-15","edb-edb-16","derby","sqlite","hsqldb-2.4","hsqldb-2.5","firebird-3","firebird-4","db2-luw","informix-12.10","informix-14.10","tidb"]' }}
testClasses: ${{ inputs.testClasses || 'LiquibaseHarnessSuiteTest' }}
steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?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-latest.xsd">
<changeSet id="1" author="as">
<setColumnRemarks columnName="first_name"
remarks="A Test Column Remark"
tableName="authors"
columnDataType="varchar(50)"/>
<rollback>
<setColumnRemarks columnName="first_name"
remarks=""
tableName="authors"
columnDataType="varchar(50)"/>
</rollback>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -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-latest.xsd">
<changeSet id="1" author="as">
<setTableRemarks remarks="A Test Remark"
tableName="authors"/>
<rollback>
<sql>ALTER TABLE authors COMMENT = ''</sql>
</rollback>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "autoincrement_test"
}
}
],
"liquibase.structure.core.Column": [
{
"column": {
"autoIncrementInformation": {
"incrementBy": "1\\!\\{java.math.BigInteger\\}",
"startWith": "1\\!\\{java.math.BigInteger\\}"
},
"name": "intColumn",
"nullable": false
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"snapshot": {
"objects": {
"com.datical.liquibase.ext.storedlogic.checkconstraint.CheckConstraint": [
{
"checkConstraint": {
"body": "((id > 0))",
"disabled": false,
"name": "test_check_constraint"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "authors"
}
}
],
"liquibase.structure.core.Column": [
{
"column": {
"name": "varcharColumn"
}
},
{
"column": {
"name": "intColumn"
}
},
{
"column": {
"name": "dateColumn"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"defaultValue": "title_test",
"name": "title",
"nullable": false
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"defaultValue": "1\\!\\{java.lang.Integer\\}",
"name": "booleanColumn",
"nullable": true
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"defaultValue": "now\\(\\)\\!\\{liquibase.statement.DatabaseFunction\\}",
"name": "inserted_date",
"nullable": true
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"defaultValue": "2008-02-12T12:34:03\\!\\{java.sql.Timestamp\\}",
"name": "dateTimeColumn",
"nullable": true
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"defaultValue": "100000000\\!\\{java.math.BigDecimal\\}",
"name": "numericColumn",
"nullable": true
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"defaultValue": "nextval\\('test_sequence'::regclass\\)\\!\\{liquibase.statement.DatabaseFunction\\}",
"name": "sequence_referenced_column",
"nullable": true,
"type": {
"typeName": "numeric"
}
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.ForeignKey": [
{
"foreignKey": {
"deferrable": false,
"initiallyDeferred": false,
"name": "fk_posts_authors_test"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "authors_data"
}
}
],
"liquibase.structure.core.Column": [
{
"column": {
"name": "authors_email"
}
}
],
"liquibase.structure.core.ForeignKey": [
{
"foreignKey": {
"deferrable": false,
"initiallyDeferred": false,
"name": "FK_AUTHORS_AUTHORS_DATA"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Column": [
{
"column": {
"name": "inserted_date",
"nullable": false,
"type": {
"typeName": "date"
}
}
}
]
}
}
}



Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "posts",
"primaryKey": "liquibase.structure.core.PrimaryKey.*"
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.UniqueConstraint": [
{
"uniqueConstraint": {
"clustered": false,
"deferrable": false,
"disabled": false,
"initiallyDeferred": false,
"name": "test_unique_constraint",
"validate": true
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Sequence": [
{
"sequence": {
"name": "test_sequence",
"cacheSize": "371717\\!\\{java.math.BigInteger\\}",
"dataType": "integer",
"incrementBy": "10\\!\\{java.math.BigInteger\\}",
"maxValue": "371717\\!\\{java.math.BigInteger\\}",
"minValue": "1\\!\\{java.math.BigInteger\\}",
"startValue": "1\\!\\{java.math.BigInteger\\}",
"willCycle": true
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"snapshot": {
"objects": {
"com.datical.liquibase.ext.storedlogic.function.Function": [
{
"function": {
"body": "CREATE OR REPLACE FUNCTION public.test_function()\n RETURNS trigger\n LANGUAGE plpgsql\nAS $function$\n BEGIN\n RAISE NOTICE 'Test function created';\n RETURN NEW;\n END;\n $function$\n",
"functionName": "test_function",
"name": "test_function()",
"valid": true
}
}
]
}
}
}
Loading

0 comments on commit df7e075

Please sign in to comment.