Skip to content

Commit 476e215

Browse files
committed
Add drizzle configuration file and update migration command
- Introduced a new drizzle.config.js file to define PostgreSQL database settings and migration paths. - Updated the db:migrate command in package.json to specify the new configuration file, ensuring proper migration handling.
1 parent 63cea03 commit 476e215

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

apps/web/drizzle.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* eslint-disable @typescript-eslint/no-require-imports */
2+
const { defineConfig } = require("drizzle-kit");
3+
4+
module.exports = defineConfig({
5+
dialect: "postgresql",
6+
schema: "./src/db/schema.ts",
7+
out: "./src/db/migrations",
8+
dbCredentials: {
9+
url: process.env.DATABASE_URL,
10+
},
11+
verbose: true,
12+
strict: true,
13+
});

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"db:generate": "drizzle-kit generate",
1111
"db:push": "drizzle-kit push",
1212
"db:studio": "drizzle-kit studio",
13-
"db:migrate": "drizzle-kit migrate",
13+
"db:migrate": "drizzle-kit migrate --config=drizzle.config.js",
1414
"db:migrate:runtime": "tsx scripts/run-migrations.ts",
1515
"db:check": "drizzle-kit check",
1616
"db:drop": "drizzle-kit drop",

0 commit comments

Comments
 (0)