Skip to content

Commit 730ae81

Browse files
committed
don't migrate on start
1 parent 635f6db commit 730ae81

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sitio/src/lib/db/connectDb.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { drizzle } from "drizzle-orm/postgres-js";
33
import postgres from "postgres";
44
import { migrate } from "drizzle-orm/postgres-js/migrator";
55

6-
export async function connectDb({
6+
export function connectDb({
77
url,
88
authToken,
99
}: {
@@ -17,6 +17,5 @@ export async function connectDb({
1717
});
1818

1919
const db = drizzle(client, { schema });
20-
await migrate(db, { migrationsFolder: "drizzle" });
2120
return db;
2221
}

sitio/src/lib/db/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import { env } from "$env/dynamic/private";
22
import { connectDb } from "./connectDb.js";
33

44
const path = env.DATABASE_URL ?? "postgresql://localhost:5432/milei";
5-
export const db = await connectDb({
5+
export const db = connectDb({
66
url: path,
77
});

0 commit comments

Comments
 (0)