forked from mtusi2026/mtusi2026lab4
Carry over lab3 HA stack and add private S3 storage, Attachment API, orphan compensation/reaper, own tests, and evidence for smoke/persistence/failover.
19 lines
379 B
Python
19 lines
379 B
Python
"""One-shot migrations (run once before API replicas)."""
|
|
import logging
|
|
|
|
from app.db import Database
|
|
|
|
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
|
|
logger = logging.getLogger("migrate")
|
|
|
|
|
|
def main() -> None:
|
|
db = Database()
|
|
db.open()
|
|
logger.info("migrations complete")
|
|
db.close()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|