From 18f4abcb7126e9cea3a37faa9ad75ea86b46af0e Mon Sep 17 00:00:00 2001 From: Jack Kingsman Date: Wed, 1 Apr 2026 17:16:42 -0700 Subject: [PATCH] Update migrations to account for my new ones --- app/migrations.py | 12 ++++++------ tests/test_migrations.py | 32 ++++++++++++++++---------------- tests/test_repository.py | 1 + 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/app/migrations.py b/app/migrations.py index 1f08fd9..b07d84a 100644 --- a/app/migrations.py +++ b/app/migrations.py @@ -367,11 +367,11 @@ async def run_migrations(conn: aiosqlite.Connection) -> int: await set_version(conn, 47) applied += 1 - # Migration 48: Repeater telemetry history table - if version < 48: - logger.info("Applying migration 48: repeater telemetry history") - await _migrate_048_repeater_telemetry_history(conn) - await set_version(conn, 48) + # Migration 49: Repeater telemetry history table + if version < 49: + logger.info("Applying migration 49: repeater telemetry history") + await _migrate_049_repeater_telemetry_history(conn) + await set_version(conn, 49) applied += 1 if applied > 0: @@ -2918,7 +2918,7 @@ async def _migrate_047_add_statistics_indexes(conn: aiosqlite.Connection) -> Non await conn.commit() -async def _migrate_048_repeater_telemetry_history(conn: aiosqlite.Connection) -> None: +async def _migrate_049_repeater_telemetry_history(conn: aiosqlite.Connection) -> None: """Create repeater_telemetry_history table for JSON-blob telemetry snapshots.""" await conn.execute( """ diff --git a/tests/test_migrations.py b/tests/test_migrations.py index 7608015..3d8f541 100644 --- a/tests/test_migrations.py +++ b/tests/test_migrations.py @@ -1247,8 +1247,8 @@ class TestMigration039: applied = await run_migrations(conn) - assert applied == 9 - assert await get_version(conn) == 47 + assert applied == 10 + assert await get_version(conn) == 49 cursor = await conn.execute( """ @@ -1319,8 +1319,8 @@ class TestMigration039: applied = await run_migrations(conn) - assert applied == 9 - assert await get_version(conn) == 47 + assert applied == 10 + assert await get_version(conn) == 49 cursor = await conn.execute( """ @@ -1386,8 +1386,8 @@ class TestMigration039: applied = await run_migrations(conn) - assert applied == 3 - assert await get_version(conn) == 47 + assert applied == 4 + assert await get_version(conn) == 49 cursor = await conn.execute( """ @@ -1439,8 +1439,8 @@ class TestMigration040: applied = await run_migrations(conn) - assert applied == 8 - assert await get_version(conn) == 47 + assert applied == 9 + assert await get_version(conn) == 49 await conn.execute( """ @@ -1501,8 +1501,8 @@ class TestMigration041: applied = await run_migrations(conn) - assert applied == 7 - assert await get_version(conn) == 47 + assert applied == 8 + assert await get_version(conn) == 49 await conn.execute( """ @@ -1554,8 +1554,8 @@ class TestMigration042: applied = await run_migrations(conn) - assert applied == 6 - assert await get_version(conn) == 47 + assert applied == 7 + assert await get_version(conn) == 49 await conn.execute( """ @@ -1694,8 +1694,8 @@ class TestMigration046: applied = await run_migrations(conn) - assert applied == 2 - assert await get_version(conn) == 47 + assert applied == 3 + assert await get_version(conn) == 49 cursor = await conn.execute( """ @@ -1788,8 +1788,8 @@ class TestMigration047: applied = await run_migrations(conn) - assert applied == 1 - assert await get_version(conn) == 47 + assert applied == 2 + assert await get_version(conn) == 49 cursor = await conn.execute( """ diff --git a/tests/test_repository.py b/tests/test_repository.py index 05a656c..a213113 100644 --- a/tests/test_repository.py +++ b/tests/test_repository.py @@ -630,6 +630,7 @@ class TestAppSettingsRepository: "flood_scope": "", "blocked_keys": "[]", "blocked_names": "[]", + "discovery_blocked_types": "[]", } ) mock_conn.execute = AsyncMock(return_value=mock_cursor)