"""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))