diff --git a/.gitignore b/.gitignore index 1f21e07d..c21378d7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ out deployment/terraform_azure/aks_kubectl_config deployment/terraform_azure/1.setup.sql deployment/terraform_azure/2.setup.sql +tmp-migration diff --git a/_build-and-test-all.sh b/_build-and-test-all.sh index 701faca7..fe844189 100755 --- a/_build-and-test-all.sh +++ b/_build-and-test-all.sh @@ -35,25 +35,9 @@ echo 'show dbs' | ./mongodb-cli.sh -i ./wait-for-services.sh localhost readers/${READER}/finished "8099" -migration_file="migration_scripts/${DATABASE}/migration.sql" -rm -f $migration_file -if [ "${DATABASE}" == "mysql" ]; then - curl https://raw.githubusercontent.com/eventuate-foundation/eventuate-common/wip-db-id-gen/mysql/4.initialize-database-db-id.sql --output $migration_file --create-dirs - cat $migration_file | ./mysql-cli.sh -i -elif [ "${DATABASE}" == "postgres" ]; then - curl https://raw.githubusercontent.com/eventuate-foundation/eventuate-common/wip-db-id-gen/postgres/5.initialize-database-db-id.sql --output $migration_file --create-dirs - cat $migration_file | ./postgres-cli.sh -i -elif [ "${DATABASE}" == "mssql" ]; then - curl https://raw.githubusercontent.com/eventuate-foundation/eventuate-common/wip-db-id-gen/mssql/4.setup-db-id.sql --output $migration_file --create-dirs - docker-compose -f docker-compose-mssql-polling.yml -f docker-compose-mssql-migration-tool.yml up --build --no-deps mssql-migration - docker-compose -f docker-compose-mssql-polling.yml -f docker-compose-mssql-migration-tool.yml stop mssql-migration - docker-compose -f docker-compose-mssql-polling.yml -f docker-compose-mssql-migration-tool.yml rm -f mssql-migration -else - echo "Unknown Database" - exit 99 -fi -rm -f $migration_file +curl -s https://raw.githubusercontent.com/eventuate-foundation/eventuate-common/master/migration/db-id/migration.sh &> /dev/stdout | bash + ${dockerall}Up -P envFile=docker-compose-env-files/db-id-gen.env diff --git a/docker-compose-mssql-migration-tool.yml b/docker-compose-mssql-migration-tool.yml deleted file mode 100755 index ee60abee..00000000 --- a/docker-compose-mssql-migration-tool.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: '3' -services: - mssql-migration: - image: mcr.microsoft.com/mssql-tools@sha256:62556500522072535cb3df2bb5965333dded9be47000473e9e0f84118e248642 - depends_on: - - mssql - environment: - TRAM_DB_SERVER: "mssql" - TRAM_SA_PASSWORD: "Eventuate123!" - TRAM_DB: "eventuate" - TRAM_SCHEMA: "eventuate" - volumes: - - ./migration_scripts/mssql:/scripts - working_dir: /scripts - entrypoint: [ "bash", "./entrypoint.sh"] \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 66603d47..7b77428b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,4 +19,6 @@ eventuateCdcImageVersion=0.10.0.BUILD-SNAPSHOT eventuateCdcKafkaEnableBatchProcessing=false removeContainers=false -eventuateExamplesBaseImageVersion=BUILD-5 +eventuateCommonVersion=0.13.0.BUILD-SNAPSHOT + +eventuateExamplesBaseImageVersion=BUILD-5 \ No newline at end of file diff --git a/migration_scripts/mssql/entrypoint.sh b/migration_scripts/mssql/entrypoint.sh deleted file mode 100644 index 0970c5df..00000000 --- a/migration_scripts/mssql/entrypoint.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -/opt/mssql-tools/bin/sqlcmd -S $TRAM_DB_SERVER -U sa -P $TRAM_SA_PASSWORD -b -d $TRAM_DB -I -i migration.sql || exit 1 \ No newline at end of file