feat: migrate displayed historical data to postgres

This commit is contained in:
devRaGonSa
2026-05-21 09:27:08 +02:00
parent c6420d5968
commit 605ab92cf8
17 changed files with 1719 additions and 25 deletions

View File

@@ -5,7 +5,7 @@ from __future__ import annotations
import sqlite3
from pathlib import Path
from .config import get_storage_path
from .config import get_database_url, get_storage_path
from .player_event_storage import initialize_player_event_storage
@@ -249,6 +249,10 @@ def _build_common_where(
def _connect(db_path: Path) -> sqlite3.Connection:
if get_database_url():
from .postgres_display_storage import connect_postgres_compat
return connect_postgres_compat()
connection = sqlite3.connect(db_path or get_storage_path())
connection.row_factory = sqlite3.Row
return connection