Skip to content

Commit

Permalink
update name
Browse files Browse the repository at this point in the history
  • Loading branch information
GroKurfuerst committed Jun 27, 2023
1 parent eba7396 commit 9e3537e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions update-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ mkdir -p sql_data

aws s3 cp s3://docker-container-data/migrations/ ./sql_data/ --recursive

type=$1
if [ -z "$type" ];
version=$1
if [ -z "$version" ];
then
./migrate -path /sql_data -database "mysql://${MYSQL_USERNAME}:${MYSQL_PASSWORD}@tcp(${MYSQL_HOSTNAME})/${MYSQL_DB_NAME}" -verbose up
else
./migrate -path /sql_data -database "mysql://${MYSQL_USERNAME}:${MYSQL_PASSWORD}@tcp(${MYSQL_HOSTNAME})/${MYSQL_DB_NAME}" force ${type}
./migrate -path /sql_data -database "mysql://${MYSQL_USERNAME}:${MYSQL_PASSWORD}@tcp(${MYSQL_HOSTNAME})/${MYSQL_DB_NAME}" force ${version}
fi

0 comments on commit 9e3537e

Please sign in to comment.