ungleich-user/dal/management
Sajeyks 167dc7445a Add migrate_locked to run migrations safely from several pods
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.
2026-11-06 15:36:37 +03:00
..
commands Add migrate_locked to run migrations safely from several pods 2026-11-06 15:36:37 +03:00
__init__.py Add migrate_locked to run migrations safely from several pods 2026-11-06 15:36:37 +03:00