split migrations

This commit is contained in:
Mateusz Gruszczyński
2026-06-05 15:36:45 +02:00
parent eaaa02b122
commit 6db15dbe3b
2 changed files with 45 additions and 232 deletions
+18
View File
@@ -0,0 +1,18 @@
from __future__ import annotations
import sqlite3
MIGRATIONS: tuple[str, ...] = ()
def run_database_migrations(conn: sqlite3.Connection) -> int:
"""Run pending database migrations.
Note: no migrations are currently required because supported databases are
already expected to use the current schema version.
"""
applied = 0
for sql in MIGRATIONS:
conn.execute(sql)
applied += 1
return applied