diff --git a/.github/workflows/lth.yml b/.github/workflows/lth.yml
index d09c1f4c..1dde40ca 100644
--- a/.github/workflows/lth.yml
+++ b/.github/workflows/lth.yml
@@ -28,7 +28,7 @@ jobs:
strategy:
max-parallel: 1
matrix:
- liquibase-support-level: [Foundational, Contributed] # Define the different test levels to run
+ liquibase-support-level: [Foundational, Contributed, Advanced] # Define the different test levels to run
fail-fast: false # Set fail-fast to false to run all test levels even if some of them fail
steps:
diff --git a/src/test/java/liquibase/ext/databricks/AdvancedExtensionHarnessTestSuite.java b/src/test/java/liquibase/ext/databricks/AdvancedExtensionHarnessTestSuite.java
index 26abdb26..4031bf0f 100644
--- a/src/test/java/liquibase/ext/databricks/AdvancedExtensionHarnessTestSuite.java
+++ b/src/test/java/liquibase/ext/databricks/AdvancedExtensionHarnessTestSuite.java
@@ -1,6 +1,9 @@
package liquibase.ext.databricks;
import liquibase.harness.AdvancedHarnessSuite;
+import liquibase.harness.snapshot.SnapshotObjectTests;
+import org.junit.platform.suite.api.SelectClasses;
+@SelectClasses({SnapshotObjectTests.class})
public class AdvancedExtensionHarnessTestSuite extends AdvancedHarnessSuite {
}
diff --git a/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/addColumn.xml b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/addColumn.xml
new file mode 100644
index 00000000..cb7c8982
--- /dev/null
+++ b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/addColumn.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/addPrimaryKey.xml b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/addPrimaryKey.xml
new file mode 100644
index 00000000..0a9dc725
--- /dev/null
+++ b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/addPrimaryKey.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/addUniqueConstraint.xml b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/addUniqueConstraint.xml
index 638b006e..ead28cdb 100644
--- a/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/addUniqueConstraint.xml
+++ b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/addUniqueConstraint.xml
@@ -4,13 +4,13 @@
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">
-
-
-
+
+
+
-
+
\ No newline at end of file
diff --git a/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/createIndex.xml b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/createIndex.xml
index 0a56772d..4d445452 100644
--- a/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/createIndex.xml
+++ b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/createIndex.xml
@@ -4,6 +4,7 @@
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">
+
diff --git a/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/createTable.xml b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/createTable.xml
new file mode 100644
index 00000000..76c50a92
--- /dev/null
+++ b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/createTable.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/createView.xml b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/createView.xml
new file mode 100644
index 00000000..95ed9a68
--- /dev/null
+++ b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/createView.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ select test_column from main.liquibase_harness_test_ds.view_table
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/snapshotCatalogAndSchema.xml b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/snapshotCatalogAndSchema.xml
new file mode 100644
index 00000000..60cfc494
--- /dev/null
+++ b/src/test/resources/liquibase/harness/snapshot/changelogs/databricks/snapshotCatalogAndSchema.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/addColumn.json b/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/addColumn.json
index 1531929f..18296f5e 100644
--- a/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/addColumn.json
+++ b/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/addColumn.json
@@ -18,6 +18,15 @@
}
}
},
+ {
+ "column": {
+ "name": "stringColumn",
+ "nullable": true,
+ "type": {
+ "typeName": "STRING"
+ }
+ }
+ },
{
"column": {
"name": "varcharColumn",
diff --git a/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/addUniqueConstraint.json b/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/addUniqueConstraint.json
index a88b65cd..29c256f2 100644
--- a/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/addUniqueConstraint.json
+++ b/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/addUniqueConstraint.json
@@ -4,7 +4,7 @@
"liquibase.structure.core.Table": [
{
"table": {
- "name": "test_table"
+ "name": "test_table_unique"
}
}
]
diff --git a/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/createTable.json b/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/createTable.json
new file mode 100644
index 00000000..979eb084
--- /dev/null
+++ b/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/createTable.json
@@ -0,0 +1,23 @@
+{
+ "snapshot": {
+ "objects": {
+ "liquibase.structure.core.Table": [
+ {
+ "table": {
+ "name": "snapshot_test_table"
+ }
+ }
+ ],
+ "liquibase.structure.core.Column": [
+ {
+ "column": {
+ "name": "snapshot_test_column",
+ "type": {
+ "typeName": "INT"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/createView.json b/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/createView.json
new file mode 100644
index 00000000..e006c8b4
--- /dev/null
+++ b/src/test/resources/liquibase/harness/snapshot/expectedSnapshot/databricks/createView.json
@@ -0,0 +1,21 @@
+{
+ "snapshot": {
+ "objects": {
+ "liquibase.structure.core.Table": [
+ {
+ "table": {
+ "name": "view_table"
+ }
+ }
+ ],
+ "liquibase.structure.core.View": [
+ {
+ "view": {
+ "definition": "select test_column from main.liquibase_harness_test_ds.view_table",
+ "name": "test_view"
+ }
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/liquibase/harness/snapshot/expectedSql/addUniqueConstraint.sql b/src/test/resources/liquibase/harness/snapshot/expectedSql/addUniqueConstraint.sql
deleted file mode 100644
index 47bbf2b5..00000000
--- a/src/test/resources/liquibase/harness/snapshot/expectedSql/addUniqueConstraint.sql
+++ /dev/null
@@ -1 +0,0 @@
-INVALID TEST
\ No newline at end of file
diff --git a/src/test/resources/liquibase/harness/snapshot/expectedSql/createIndex.sql b/src/test/resources/liquibase/harness/snapshot/expectedSql/createIndex.sql
deleted file mode 100644
index 47bbf2b5..00000000
--- a/src/test/resources/liquibase/harness/snapshot/expectedSql/createIndex.sql
+++ /dev/null
@@ -1 +0,0 @@
-INVALID TEST
\ No newline at end of file