0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 21:49:51 +01:00
posthog/bin/migrate
Karl-Aksel Puulmann c8d6b2225f
feat(sharding): add command to sync tables onto new nodes (#8912)
* feat(sharding): add command to sync tables onto new nodes

clickhouse-operator only syncs some tables onto new nodes. This new
command ensures that when adding new shards, they are automatically
synced up on redeploying

Note that there might be timing concerns here as resharding on altinity
cloud does not redeploy automatically. In practice however what this
means is that new nodes just won't ingest any data until another deploy

* Add test to the new command

* Improve non-replicated test
2022-03-08 12:50:49 +02:00

8 lines
159 B
Bash
Executable File

#!/bin/bash
set -e
python manage.py migrate
python manage.py migrate_clickhouse
python manage.py run_async_migrations
python manage.py sync_replicated_schema