forked from mickasmt/next-saas-stripe-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: deploy new neon db to edge #561
- added dreon and preon environment variables - migrated schema to db package - replaced planetscale with neon serverless and pg - migrated drizzle schema to neon Closes #561, closes #628, closes #629, closes #564
- Loading branch information
Showing
27 changed files
with
2,407 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
import type { Config } from "drizzle-kit"; | ||
import * as dotenv from "dotenv"; | ||
import type { Config } from 'drizzle-kit'; | ||
|
||
dotenv.config({ path: "../../.env" }); | ||
import * as dotenv from 'dotenv'; | ||
|
||
const uri = [ | ||
"mysql://", | ||
process.env.DB_USERNAME, | ||
":", | ||
process.env.DB_PASSWORD, | ||
"@", | ||
process.env.DB_HOST, | ||
":3306/", | ||
process.env.DB_NAME, | ||
'?ssl={"rejectUnauthorized":true}', | ||
].join(""); | ||
dotenv.config({ path: '../../.env' }); | ||
|
||
if (!process.env.DREON_DIRECT_URL) { | ||
throw new Error('Drizzle Config Error: DREON_DIRECT_URL is not defined.`'); | ||
} | ||
|
||
export default { | ||
schema: "./src/schema", | ||
driver: "mysql2", | ||
dbCredentials: { uri }, | ||
tablesFilter: ["t3turbo_*"], | ||
schema: './src/schema', | ||
out: './drizzle', | ||
driver: 'pg', | ||
dbCredentials: { | ||
connectionString: process.env.DREON_DIRECT_URL, | ||
}, | ||
tablesFilter: ['av_*'], | ||
} satisfies Config; |
Oops, something went wrong.