Skip to content

Commit ef14034

Browse files
Fix migrate script (vercel#560)
1 parent fdd0ace commit ef14034

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/db/migrate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const runMigrate = async () => {
1818
console.log('⏳ Running migrations...');
1919

2020
const start = Date.now();
21-
await migrate(db, { migrationsFolder: './lib/drizzle' });
21+
await migrate(db, { migrationsFolder: './lib/db/migrations' });
2222
const end = Date.now();
2323

2424
console.log('✅ Migrations completed in', end - start, 'ms');

lib/db/queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
// https://authjs.dev/reference/adapter/drizzle
2323

2424
// biome-ignore lint: Forbidden non-null assertion.
25-
const client = postgres(`${process.env.POSTGRES_URL!}?sslmode=require`);
25+
const client = postgres(process.env.POSTGRES_URL!);
2626
const db = drizzle(client);
2727

2828
export async function getUser(email: string): Promise<Array<User>> {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev --turbo",
7-
"build": "next build",
7+
"build": "tsx lib/db/migrate && next build",
88
"start": "next start",
99
"lint": "next lint && biome lint --write --unsafe",
1010
"lint:fix": "next lint --fix && biome lint --write --unsafe",

0 commit comments

Comments
 (0)