diff --git a/backend/src/db/client.ts b/backend/src/db/client.ts index 5fac93f..a3893a8 100644 --- a/backend/src/db/client.ts +++ b/backend/src/db/client.ts @@ -3,7 +3,7 @@ import { drizzle } from "drizzle-orm/libsql"; import { existsSync, mkdirSync, accessSync, constants, statSync, writeFileSync } from "fs"; import { resolve } from "path"; import dotenv from "dotenv"; -import { getTableCreationSQL } from "./schema-sql"; +import { getTableCreationSQL } from "./schema-sql.js"; dotenv.config({ path: process.env.DOTENV_PATH || ".env" }); @@ -45,7 +45,7 @@ export function ensureDataDirectory(dataDir: string): { success: boolean; error? } /** Get the SQL statements for creating all tables (re-exported from schema-sql) */ -export { getTableCreationSQL } from "./schema-sql"; +export { getTableCreationSQL } from "./schema-sql.js"; /** Run table creation migrations on a client */ export async function runTableMigrations(client: Client): Promise<{ success: boolean; errors: string[] }> { diff --git a/backend/src/db/migrate.ts b/backend/src/db/migrate.ts index c6525df..1b5862f 100644 --- a/backend/src/db/migrate.ts +++ b/backend/src/db/migrate.ts @@ -2,7 +2,7 @@ import { createClient, Client } from "@libsql/client"; import dotenv from "dotenv"; import fs from "fs"; import path from "path"; -import { getTableCreationSQL } from "./schema-sql"; +import { getTableCreationSQL } from "./schema-sql.js"; dotenv.config({ path: process.env.DOTENV_PATH || ".env" }); diff --git a/backend/src/test/setup.ts b/backend/src/test/setup.ts index d3f4a5e..8fd4ef8 100644 --- a/backend/src/test/setup.ts +++ b/backend/src/test/setup.ts @@ -10,7 +10,7 @@ import fastifyMultipart from "@fastify/multipart"; import { createClient, Client } from "@libsql/client"; import { drizzle } from "drizzle-orm/libsql"; import { beforeAll, afterAll, beforeEach } from "vitest"; -import { getTableCreationSQL } from "../db/schema-sql"; +import { getTableCreationSQL } from "../db/schema-sql.js"; // Type for our test database export type TestDb = ReturnType;