Files
paper-atlas/paper_atlas/db/backend.py
codex-bot a3b677bdf2
Metadata integrity checks / metadata (push) Successful in 46s
Add verified PostgreSQL migration and shared research queries
2026-11-07 02:09:19 +08:00

9 lines
382 B
Python

"""Prevent legacy writers from diverging after an explicit PostgreSQL cutover."""
from pathlib import Path
def require_sqlite_writable(path):
marker = Path(str(Path(path).resolve()) + '.postgresql-cutover.json')
if marker.exists():
raise RuntimeError('This SQLite source was cut over to PostgreSQL; use the configured PostgreSQL database. Marker: ' + str(marker))