Skip to content

Commit

Permalink
Fix migrate script (vercel#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyphilemon authored Nov 20, 2024
1 parent fdd0ace commit ef14034
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/db/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const runMigrate = async () => {
console.log('⏳ Running migrations...');

const start = Date.now();
await migrate(db, { migrationsFolder: './lib/drizzle' });
await migrate(db, { migrationsFolder: './lib/db/migrations' });
const end = Date.now();

console.log('✅ Migrations completed in', end - start, 'ms');
Expand Down
2 changes: 1 addition & 1 deletion lib/db/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
// https://authjs.dev/reference/adapter/drizzle

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

export async function getUser(email: string): Promise<Array<User>> {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "next dev --turbo",
"build": "next build",
"build": "tsx lib/db/migrate && next build",
"start": "next start",
"lint": "next lint && biome lint --write --unsafe",
"lint:fix": "next lint --fix && biome lint --write --unsafe",
Expand Down

0 comments on commit ef14034

Please sign in to comment.