From fad1aa0501a43669936e5aeb0bb28971be3f6876 Mon Sep 17 00:00:00 2001 From: claude_code Date: Fri, 26 Jun 2026 20:14:31 +0300 Subject: [PATCH] fix(db): move share-aliases migration spec out of migrations/ The #205 share-aliases feature placed share-aliases.migration.spec.ts inside src/database/migrations/. Kysely's FileMigrationProvider loads EVERY file in that folder as a migration, so `migration:latest` imported the test file and crashed with "ReferenceError: describe is not defined" (no Jest globals under tsx). That broke the migration step shared by the e2e-server, e2e-mcp and integration-test (test/test) jobs. Move the spec one level up to src/database/ (matching the existing src/database/jsonb-bind.spec.ts convention) so the migration runner no longer sees it, and fix its relative imports (./migrations/... and ./types/...). Jest still picks it up via the src/**/*.spec.ts test glob. Verified locally: 3 passed. Co-Authored-By: Claude Opus 4.8 --- .../database/{migrations => }/share-aliases.migration.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename apps/server/src/database/{migrations => }/share-aliases.migration.spec.ts (96%) diff --git a/apps/server/src/database/migrations/share-aliases.migration.spec.ts b/apps/server/src/database/share-aliases.migration.spec.ts similarity index 96% rename from apps/server/src/database/migrations/share-aliases.migration.spec.ts rename to apps/server/src/database/share-aliases.migration.spec.ts index d891c799..e517add0 100644 --- a/apps/server/src/database/migrations/share-aliases.migration.spec.ts +++ b/apps/server/src/database/share-aliases.migration.spec.ts @@ -1,9 +1,9 @@ -import * as migration from './20260626T130000-share-aliases'; +import * as migration from './migrations/20260626T130000-share-aliases'; import type { InsertableShareAlias, ShareAlias, UpdatableShareAlias, -} from '../types/entity.types'; +} from './types/entity.types'; /** * Sanity checks for the share_aliases migration + entity types. We don't run a