Fix migrate script (#560)
This commit is contained in:
parent
fdd0acef59
commit
ef1403441e
3 changed files with 3 additions and 3 deletions
|
|
@ -18,7 +18,7 @@ const runMigrate = async () => {
|
||||||
console.log('⏳ Running migrations...');
|
console.log('⏳ Running migrations...');
|
||||||
|
|
||||||
const start = Date.now();
|
const start = Date.now();
|
||||||
await migrate(db, { migrationsFolder: './lib/drizzle' });
|
await migrate(db, { migrationsFolder: './lib/db/migrations' });
|
||||||
const end = Date.now();
|
const end = Date.now();
|
||||||
|
|
||||||
console.log('✅ Migrations completed in', end - start, 'ms');
|
console.log('✅ Migrations completed in', end - start, 'ms');
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import {
|
||||||
// https://authjs.dev/reference/adapter/drizzle
|
// https://authjs.dev/reference/adapter/drizzle
|
||||||
|
|
||||||
// biome-ignore lint: Forbidden non-null assertion.
|
// 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);
|
const db = drizzle(client);
|
||||||
|
|
||||||
export async function getUser(email: string): Promise<Array<User>> {
|
export async function getUser(email: string): Promise<Array<User>> {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbo",
|
"dev": "next dev --turbo",
|
||||||
"build": "next build",
|
"build": "tsx lib/db/migrate && next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint && biome lint --write --unsafe",
|
"lint": "next lint && biome lint --write --unsafe",
|
||||||
"lint:fix": "next lint --fix && biome lint --write --unsafe",
|
"lint:fix": "next lint --fix && biome lint --write --unsafe",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue