Skip to content

Commit

Permalink
Merge pull request eventuate-tram#83 from dartartem/development
Browse files Browse the repository at this point in the history
Moved migration script to eventuate-common (Requires released version of eventuate-common).
  • Loading branch information
cer authored Mar 25, 2021
2 parents 41d936b + f145d58 commit 0e88b27
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 2 additions & 18 deletions _build-and-test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 0 additions & 15 deletions docker-compose-mssql-migration-tool.yml

This file was deleted.

4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions migration_scripts/mssql/entrypoint.sh

This file was deleted.

0 comments on commit 0e88b27

Please sign in to comment.