diff --git a/.github/workflows/gcp.yml b/.github/workflows/gcp.yml index f897b8a9b..3b577246f 100644 --- a/.github/workflows/gcp.yml +++ b/.github/workflows/gcp.yml @@ -23,14 +23,14 @@ on: databases: description: Databases to start up. Comma separated list of "name:version" required: true - default: "[\"postgresql:11\",\"postgresql:12\",\"postgresql:13\",\"postgresql:14\",\"mysql:gcp\",\"mssql:2019\"]" + default: "[\"postgresql:11\",\"postgresql:12\",\"postgresql:13\",\"postgresql:14\",\"mysql:gcp\",\"mssql:gcp\"]" jobs: setup: name: Setup runs-on: ubuntu-latest outputs: - databases: ${{ github.event.inputs.databases || '["postgresql:11","postgresql:12","postgresql:13","postgresql:14","mysql:gcp","mssql:2019"]' }} + databases: ${{ github.event.inputs.databases || '["postgresql:11","postgresql:12","postgresql:13","postgresql:14","mysql:gcp","mssql:gcp"]' }} testClasses: ${{ inputs.testClasses || 'LiquibaseHarnessSuiteTest' }} steps: - name: Checkout @@ -120,7 +120,7 @@ jobs: if: ${{ steps.setup.outputs.databasePlatform == 'mssql' }} with: operation: "update" - classpath: "src/test/resources/init-changelogs/aws" + classpath: "src/test/resources/init-changelogs/gcp" changeLogFile: "mssql.sql" username: "${{secrets.TH_DB_ADMIN}}" password: "${{secrets.TH_DB_PASSWD}}" diff --git a/src/main/resources/liquibase/harness/change/expectedSql/mssql/gcp/setColumnRemarks.sql b/src/main/resources/liquibase/harness/change/expectedSql/mssql/gcp/setColumnRemarks.sql new file mode 100644 index 000000000..e57bb08e1 --- /dev/null +++ b/src/main/resources/liquibase/harness/change/expectedSql/mssql/gcp/setColumnRemarks.sql @@ -0,0 +1 @@ +IF EXISTS( SELECT extended_properties.value FROM SYS.EXTENDED_PROPERTIES WHERE major_id = OBJECT_ID('lbuser.authors') AND name = N'MS_DESCRIPTION' AND minor_id = ( SELECT column_id FROM SYS.COLUMNS WHERE name = 'id' AND object_id = OBJECT_ID('lbuser.authors')) ) BEGIN EXEC sys.sp_updateextendedproperty @name = N'MS_Description' , @value = N'A Test Column Remark' , @level0type = N'SCHEMA' , @level0name = N'lbuser' , @level1type = N'TABLE' , @level1name = N'authors' , @level2type = N'COLUMN' , @level2name = N'id' END ELSE BEGIN EXEC sys.sp_addextendedproperty @name = N'MS_Description' , @value = N'A Test Column Remark' , @level0type = N'SCHEMA' , @level0name = N'lbuser' , @level1type = N'TABLE' , @level1name = N'authors' , @level2type = N'COLUMN' , @level2name = N'id' END \ No newline at end of file diff --git a/src/main/resources/liquibase/harness/change/expectedSql/mssql/gcp/setTableRemarks.sql b/src/main/resources/liquibase/harness/change/expectedSql/mssql/gcp/setTableRemarks.sql new file mode 100644 index 000000000..0c0b52e1e --- /dev/null +++ b/src/main/resources/liquibase/harness/change/expectedSql/mssql/gcp/setTableRemarks.sql @@ -0,0 +1 @@ +IF EXISTS( SELECT extended_properties.value FROM SYS.EXTENDED_PROPERTIES WHERE major_id = OBJECT_ID('lbuser.authors') AND name = N'MS_DESCRIPTION' AND minor_id = 0 ) BEGIN EXEC sys.sp_updateextendedproperty @name = N'MS_Description' , @value = N'A Test Remark' , @level0type = N'SCHEMA' , @level0name = N'lbuser' , @level1type = N'TABLE' , @level1name = N'authors' END ELSE BEGIN EXEC sys.sp_addextendedproperty @name = N'MS_Description' , @value = N'A Test Remark' , @level0type = N'SCHEMA' , @level0name = N'lbuser' , @level1type = N'TABLE' , @level1name = N'authors' END \ No newline at end of file diff --git a/src/test/resources/harness-config-cloud.yml b/src/test/resources/harness-config-cloud.yml index 2cb1689cb..eb9465a04 100644 --- a/src/test/resources/harness-config-cloud.yml +++ b/src/test/resources/harness-config-cloud.yml @@ -95,7 +95,7 @@ databasesUnderTest: - name: mssql prefix: gcp - version: 2019 + version: gcp url: DBENDPOINT username: USERNAME password: PASSWORD