forked from ungleich-public/ungleich-user
Each pod runs migrations in its init container, and Kubernetes can start several at once. Django does not guard against concurrent migrate runs. migrate_locked holds a PostgreSQL advisory lock while migrating; on SQLite it is plain migrate. With three runs started at once on an empty database, one applied all migrations and the other two waited, then had nothing to do. |
||
|---|---|---|
| .. | ||
| commands | ||
| __init__.py | ||