generated from liquibase/liquibase-extension-example
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from liquibase/DAT-19349
DAT-19349: Revised and updated harness tests, enabled some missing suites, extended and updated expected snapshots.
- Loading branch information
Showing
20 changed files
with
157 additions
and
23 deletions.
There are no files selected for viewing
13 changes: 12 additions & 1 deletion
13
...st/resources/liquibase/harness/change/expectedSnapshot/databricks/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 |
---|---|---|
@@ -1,3 +1,14 @@ | ||
{ | ||
|
||
"snapshot": { | ||
"objects": { | ||
"liquibase.structure.core.Table": [ | ||
{ | ||
"table": { | ||
"name": "posts", | ||
"tblProperties": ".*'delta.constraints.test_check_constraint'='id > 0'.*" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/test/resources/liquibase/harness/change/expectedSnapshot/databricks/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,24 @@ | ||
{ | ||
"snapshot": { | ||
"objects": { | ||
"liquibase.structure.core.Table": [ | ||
{ | ||
"table": { | ||
"name": "posts" | ||
} | ||
} | ||
], | ||
"liquibase.structure.core.Column": [ | ||
{ | ||
"column": { | ||
"name": "title", | ||
"type": { | ||
"typeName": "VARCHAR" | ||
}, | ||
"defaultValue": "title_test" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...esources/liquibase/harness/change/expectedSnapshot/databricks/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,17 @@ | ||
{ | ||
"snapshot": { | ||
"objects": { | ||
"liquibase.structure.core.Column": [ | ||
{ | ||
"column": { | ||
"name": "booleanColumn", | ||
"type": { | ||
"typeName": "BOOLEAN" | ||
}, | ||
"defaultValue": "TRUE" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...sources/liquibase/harness/change/expectedSnapshot/databricks/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,18 @@ | ||
{ | ||
"snapshot": { | ||
"objects": { | ||
"liquibase.structure.core.Column": [ | ||
{ | ||
"column": { | ||
"name": "inserted_date", | ||
"type": { | ||
"typeName": "DATE" | ||
}, | ||
"defaultValue": "CURRENT_TIMESTAMP", | ||
"nullable": true | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...t/resources/liquibase/harness/change/expectedSnapshot/databricks/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,18 @@ | ||
{ | ||
"snapshot": { | ||
"objects": { | ||
"liquibase.structure.core.Column": [ | ||
{ | ||
"column": { | ||
"name": "dateTimeColumn", | ||
"type": { | ||
"typeName": "TIMESTAMP" | ||
}, | ||
"defaultValue": "'2008-02-12 12:34:03'", | ||
"nullable": true | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/test/resources/liquibase/harness/change/expectedSnapshot/databricks/alterCluster.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 |
---|---|---|
@@ -1,2 +1,14 @@ | ||
{ | ||
"snapshot": { | ||
"objects": { | ||
"liquibase.structure.core.Table": [ | ||
{ | ||
"table": { | ||
"name": "test_table_alter_cluster", | ||
"clusteringColumns": "test_id,test_new" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
13 changes: 12 additions & 1 deletion
13
.../resources/liquibase/harness/change/expectedSnapshot/databricks/alterTableProperties.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 |
---|---|---|
@@ -1,3 +1,14 @@ | ||
{ | ||
|
||
"snapshot": { | ||
"objects": { | ||
"liquibase.structure.core.Table": [ | ||
{ | ||
"table": { | ||
"name": "test_alter_table_properties", | ||
"tblProperties": ".*'external.location'='s3://mybucket/mytable', 'this.is.my.key'='12', 'this.is.my.key2'='true'.*" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
13 changes: 12 additions & 1 deletion
13
...t/resources/liquibase/harness/change/expectedSnapshot/databricks/alterViewProperties.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 |
---|---|---|
@@ -1,3 +1,14 @@ | ||
{ | ||
|
||
"snapshot": { | ||
"objects": { | ||
"liquibase.structure.core.View": [ | ||
{ | ||
"view": { | ||
"name": "test_alter_view_properties", | ||
"tblProperties": ".*'external.location'='s3://mybucket/mytable', 'this.is.my.key'='12', 'this.is.my.key2'='true'.*" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
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
15 changes: 14 additions & 1 deletion
15
...t/resources/liquibase/harness/change/expectedSnapshot/databricks/dropCheckConstraint.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 |
---|---|---|
@@ -1,3 +1,16 @@ | ||
{ | ||
|
||
"snapshot": { | ||
"objects": { | ||
"_noMatch": true, | ||
"_noMatchField": "tblProperties", | ||
"liquibase.structure.core.Table": [ | ||
{ | ||
"table": { | ||
"name": "posts", | ||
"tblProperties": ".*'delta.constraints.test_check_constraint'='id > 0'.*" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
4 changes: 1 addition & 3 deletions
4
src/test/resources/liquibase/harness/change/expectedSql/databricks/addDefaultValue.sql
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 |
---|---|---|
@@ -1,3 +1 @@ | ||
INVALID TEST | ||
-- Databricks supports default values, but does not support them in snapshot data json | ||
--ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN title SET DEFAULT 'title_test' | ||
ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN title SET DEFAULT 'title_test' |
5 changes: 2 additions & 3 deletions
5
...test/resources/liquibase/harness/change/expectedSql/databricks/addDefaultValueBoolean.sql
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
INVALID TEST | ||
-- Databricks supports default values, but the object does not exist in the metadata | ||
-- --ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN title SET DEFAULT false | ||
ALTER TABLE main.liquibase_harness_test_ds.authors ADD COLUMN booleanColumn BOOLEAN | ||
ALTER TABLE main.liquibase_harness_test_ds.authors ALTER COLUMN booleanColumn SET DEFAULT TRUE |
3 changes: 1 addition & 2 deletions
3
...est/resources/liquibase/harness/change/expectedSql/databricks/addDefaultValueComputed.sql
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
INVALID TEST | ||
-- Databricks supports default values and generated columns, but the object does not exist in the metadata returned in jdbc | ||
ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN inserted_date SET DEFAULT CURRENT_TIMESTAMP |
5 changes: 2 additions & 3 deletions
5
src/test/resources/liquibase/harness/change/expectedSql/databricks/addDefaultValueDate.sql
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
INVALID TEST | ||
-- Databricks supports default values, but the object does not exist in the metadata | ||
--ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN title SET DEFAULT false | ||
ALTER TABLE main.liquibase_harness_test_ds.authors ADD COLUMN dateTimeColumn TIMESTAMP | ||
ALTER TABLE main.liquibase_harness_test_ds.authors ALTER COLUMN dateTimeColumn SET DEFAULT '2008-02-12 12:34:03' |
5 changes: 3 additions & 2 deletions
5
...test/resources/liquibase/harness/change/expectedSql/databricks/addDefaultValueNumeric.sql
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
INVALID TEST | ||
-- Databricks supports default values, but the object does not exist in the metadata | ||
--ALTER TABLE main.liquibase_harness_test_ds.posts ALTER COLUMN title SET DEFAULT false | ||
-- Databricks does not support NUMBER type | ||
-- ALTER TABLE main.liquibase_harness_test_ds.authors ADD COLUMN numericColumn NUMBER | ||
-- ALTER TABLE main.liquibase_harness_test_ds.authors ALTER COLUMN numericColumn SET DEFAULT 100000000 |
3 changes: 2 additions & 1 deletion
3
...resources/liquibase/harness/change/expectedSql/databricks/addDefaultValueSequenceNext.sql
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
INVALID TEST | ||
INVALID TEST | ||
--Database databricks does not support sequences |
2 changes: 1 addition & 1 deletion
2
src/test/resources/liquibase/harness/change/expectedSql/databricks/createFunction.sql
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
INVALID TEST | ||
-- Databricks supports functions, but this can only be done in liquibase PRO | ||
-- Databricks supports functions, but this can only be done in Databricks commercial extension |
2 changes: 1 addition & 1 deletion
2
src/test/resources/liquibase/harness/change/expectedSql/databricks/enableTrigger.sql
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
INVALID TEST | ||
Databricks does not support the concept of triggers | ||
--Databricks does not support the concept of triggers |
2 changes: 1 addition & 1 deletion
2
src/test/resources/liquibase/harness/change/expectedSql/databricks/renameTrigger.sql
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
INVALID TEST | ||
Databricks does not support the concept of triggers | ||
--Databricks does not support the concept of triggers |