-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
python manage.py migrate | ||
python manage.py migrate_clickhouse | ||
python manage.py migrate & | ||
pid1=$! | ||
|
||
python manage.py migrate_clickhouse & | ||
|
||
# NOTE: we do not apply any non-noop migrations here. Rather these are run | ||
# manually within the UI. See https://posthog.com/docs/runbook/async-migrations | ||
# for details. | ||
python manage.py run_async_migrations --complete-noop-migrations | ||
python manage.py run_async_migrations --complete-noop-migrations & | ||
|
||
# NOTE: this check should not fail if a migration isn't complete but within the | ||
# given async migration posthog version range, thus this should not block e.g. | ||
# k8s pod deployments. | ||
python manage.py run_async_migrations --check | ||
python manage.py run_async_migrations --check & | ||
|
||
python manage.py sync_replicated_schema & | ||
|
||
pid2=$! | ||
|
||
python manage.py sync_replicated_schema | ||
wait $pid1 | ||
wait $pid2 |