2
0

fix(snuba): Add migrate call on setup (#281)

We need to run `snuba migrate` to be able to safely upgrade between Snuba versions
This commit is contained in:
Burak Yigit Kaya 2019-11-25 23:01:14 +03:00 committed by GitHub
parent 5d064c2224
commit 9d21847218
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,10 @@ fi
echo "Boostrapping Snuba..." echo "Boostrapping Snuba..."
docker-compose up -d kafka redis clickhouse docker-compose up -d kafka redis clickhouse
until $(docker-compose run --rm clickhouse clickhouse-client -h clickhouse --query="SHOW TABLES;" | grep -q sentry_local); do until $(docker-compose run --rm clickhouse clickhouse-client -h clickhouse --query="SHOW TABLES;" | grep -q sentry_local); do
# `bootstrap` is for fresh installs, and `migrate` is for existing installs
# Running them both for both cases is harmless so we blindly run them
docker-compose run --rm snuba-api bootstrap --force || true; docker-compose run --rm snuba-api bootstrap --force || true;
docker-compose run --rm snuba-api migrate || true;
done; done;
echo "" echo ""