from pathlib import Path SQL = Path(__file__).resolve().parents[2] / "database" / "sql" FILES = ( "schema/billing.sql", "schema/receipts.sql", "schema/checks.sql", "schema/reports.sql", "functions/checks.sql", "functions/billing.sql", "functions/receipts.sql", "functions/chat.sql", "functions/reports.sql", ) def sql(): return "\n".join((SQL / name).read_text(encoding="utf-8") for name in FILES)