Skip to content

Commit

Permalink
feat: update drizzle
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanCassiere committed Jun 17, 2024
1 parent aa2ed7e commit 08d35f1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 272 deletions.
10 changes: 5 additions & 5 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import "dotenv/config";
import type { Config } from "drizzle-kit";
import { defineConfig } from "drizzle-kit";

const DB_URL = process.env.DATABASE_URL;

if (!DB_URL) {
throw new Error("DATABASE_URL is not defined");
}

export default {
export default defineConfig({
schema: "./src/config/db/schema.ts",
out: "./drizzle",
driver: "pg",
dialect: "postgresql",
dbCredentials: {
connectionString: DB_URL,
url: DB_URL,
},
} satisfies Config;
});
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build:kill-dist": "rimraf ./dist",
"build:code": "tsc",
"build": "pnpm run build:kill-dist && pnpm run build:code",
"db:explorer": "drizzle-kit studio --port 3590",
"db:explorer": "drizzle-kit studio",
"db:migrate-generate": "drizzle-kit generate:pg",
"db:migrate-run": "ts-node ./migrator.ts"
},
Expand All @@ -25,7 +25,7 @@
"@types/node": "^20.10.6",
"@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0",
"drizzle-kit": "^0.20.9",
"drizzle-kit": "^0.22.7",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.2",
Expand All @@ -41,10 +41,10 @@
"@fastify/rate-limit": "^9.1.0",
"@paralleldrive/cuid2": "^2.2.2",
"dotenv": "^16.3.1",
"drizzle-orm": "^0.29.3",
"drizzle-orm": "^0.31.2",
"fastify": "^4.25.2",
"fastify-zod": "^1.4.0",
"postgres": "^3.4.3",
"postgres": "^3.4.4",
"zod": "^3.22.4",
"zod-to-json-schema": "^3.22.3"
}
Expand Down
Loading

0 comments on commit 08d35f1

Please sign in to comment.