forked from mtusi2026/mtusi2026lab5
9 lines
272 B
Python
9 lines
272 B
Python
from pathlib import Path
|
|
from src.storage import db
|
|
|
|
with db() as conn:
|
|
conn.execute('SELECT pg_advisory_xact_lock(440001)')
|
|
for path in sorted(Path('migrations').glob('*.sql')):
|
|
conn.execute(path.read_text())
|
|
print('Schema ready (idempotent migration).')
|