Skip to content

Commit

Permalink
Merge pull request eventuate-tram#52 from dartartem/wip-db-id-gen
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 23, 2021
2 parents 5fc7ad7 + c1fb8a8 commit c4f1e61
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ build/
*.idea/
*.iml
*.log

tmp-migration

out
15 changes: 2 additions & 13 deletions _build-and-test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,9 @@ ${dockerall}Up

./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
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
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ eventuatePlatformVersion=2020.4.BUILD-SNAPSHOT
swaggerUiVersion=3.23.11
eventuateExamplesBaseImageVersion=BUILD-5

eventuateCommonVersion=0.13.0.BUILD-SNAPSHOT

version=0.1.0-SNAPSHOT

0 comments on commit c4f1e61

Please sign in to comment.