-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DAT-19188] Adding TiDB to Test Harness (#976)
* DAT-19188 adding tidb
- Loading branch information
1 parent
708f291
commit df7e075
Showing
107 changed files
with
1,688 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/resources/liquibase/harness/change/changelogs/mysql/tidb/setColumnRemarks.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
14 changes: 14 additions & 0 deletions
14
src/main/resources/liquibase/harness/change/changelogs/mysql/tidb/setTableRemarks.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
25 changes: 25 additions & 0 deletions
25
...main/resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addAutoIncrement.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...in/resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addCheckConstraint.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addColumn.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addDefaultValue.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...esources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addDefaultValueBoolean.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...sources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addDefaultValueComputed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...n/resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addDefaultValueDate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...esources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addDefaultValueNumeric.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...ces/liquibase/harness/change/expectedSnapshot/mysql/tidb/addDefaultValueSequenceNext.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addForeignKey.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addLookupTable.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
.../resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addNotNullConstraint.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
|
||
|
||
|
14 changes: 14 additions & 0 deletions
14
src/main/resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addPrimaryKey.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.*" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...n/resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/addUniqueConstraint.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/alterSequence.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/resources/liquibase/harness/change/expectedSnapshot/mysql/tidb/createFunction.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.