diff --git a/src/lib/db/migrations/123_usage_history_account_identity.sql b/src/lib/db/migrations/127_usage_history_account_identity.sql similarity index 98% rename from src/lib/db/migrations/123_usage_history_account_identity.sql rename to src/lib/db/migrations/127_usage_history_account_identity.sql index fbc8ad0af0..c456c9260d 100644 --- a/src/lib/db/migrations/123_usage_history_account_identity.sql +++ b/src/lib/db/migrations/127_usage_history_account_identity.sql @@ -1,4 +1,4 @@ --- Migration 123: Snapshot stable account identity on usage events. +-- Migration 127: Snapshot stable account identity on usage events. -- Startup schema ensure adds the columns first so an interrupted pre-marker -- upgrade can rerun this atomic backfill and index creation. diff --git a/tests/unit/db-migration-runner.test.ts b/tests/unit/db-migration-runner.test.ts index 85a75ae8cb..3d96b79069 100644 --- a/tests/unit/db-migration-runner.test.ts +++ b/tests/unit/db-migration-runner.test.ts @@ -65,7 +65,7 @@ test("migration 123 backfills account snapshots and creates its index", async () const runner = await importFresh("src/lib/db/migrationRunner.ts"); const db = createDb(); const migrationSql = fs.readFileSync( - "src/lib/db/migrations/123_usage_history_account_identity.sql", + "src/lib/db/migrations/127_usage_history_account_identity.sql", "utf8" ); @@ -97,7 +97,7 @@ test("migration 123 backfills account snapshots and creates its index", async () `); const count = withMockedMigrationFs( - { "123_usage_history_account_identity.sql": migrationSql }, + { "127_usage_history_account_identity.sql": migrationSql }, () => runner.runMigrations(db) ); const rows = db @@ -130,7 +130,7 @@ test("migration 123 preserves exact dedup identity and ignores non-string JSON s const runner = await importFresh("src/lib/db/migrationRunner.ts"); const db = createDb(); const sql = fs.readFileSync( - "src/lib/db/migrations/123_usage_history_account_identity.sql", + "src/lib/db/migrations/127_usage_history_account_identity.sql", "utf8" ); @@ -172,7 +172,7 @@ test("migration 123 preserves exact dedup identity and ignores non-string JSON s ('', ''); `); - const count = withMockedMigrationFs({ "123_usage_history_account_identity.sql": sql }, () => + const count = withMockedMigrationFs({ "127_usage_history_account_identity.sql": sql }, () => runner.runMigrations(db) ); const rows = db