Files
pyTorrent/pytorrent/migrations.py
T
Mateusz Gruszczyński 6db15dbe3b split migrations
2026-06-05 15:36:45 +02:00

19 lines
442 B
Python

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