Skip to content

Commit

Permalink
Fixing SSL Error for local dev (#37)
Browse files Browse the repository at this point in the history
* fix: db-ssl-errors

* access from env

* refactor drizzle config to use defineConfig

---------

Co-authored-by: Touha Zohair <[email protected]>
  • Loading branch information
Kinfe123 and iamtouha authored Feb 23, 2024
1 parent f2d01f7 commit e70e266
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 33 deletions.
10 changes: 4 additions & 6 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { type Config } from "drizzle-kit";

import { env } from "@/env";
import { defineConfig } from "drizzle-kit";
import { DATABASE_PREFIX } from "@/lib/constants";

export default {
export default defineConfig({
schema: "./src/server/db/schema.ts",
out: "./drizzle",
driver: "mysql2",
dbCredentials: {
connectionString: env.DATABASE_URL,
uri: process.env.DATABASE_URL!,
},
tablesFilter: [`${DATABASE_PREFIX}_*`],
} satisfies Config;
});
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"arctic": "^1.1.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"drizzle-orm": "^0.28.5",
"mysql2": "^3.7.1",
"drizzle-orm": "^0.29.3",
"lucia": "3.0.0",
"next": "^14.1.0",
"next-themes": "^0.2.1",
Expand Down Expand Up @@ -72,9 +73,9 @@
"@typescript-eslint/parser": "^6.11.0",
"autoprefixer": "^10.4.14",
"dotenv-cli": "^7.3.0",
"drizzle-kit": "^0.19.3",
"drizzle-kit": "^0.20.13",
"eslint": "^8.54.0",
"mysql2": "^3.6.1",
"mysql2": "^3.7.1",
"postcss": "^8.4.31",
"prettier": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.7",
Expand Down
77 changes: 53 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e70e266

Please sign in to comment.