File tree Expand file tree Collapse file tree 3 files changed +2
-12
lines changed
Expand file tree Collapse file tree 3 files changed +2
-12
lines changed Original file line number Diff line number Diff line change 7474 working-directory : ./apps/sim
7575 env :
7676 DATABASE_URL : ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
77- DATABASE_SSL_CERT : ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_SSL_CERT || '' }}
7877 run : bunx drizzle-kit migrate
Original file line number Diff line number Diff line change 11import type { Config } from 'drizzle-kit'
22import { env } from './lib/env'
33
4- const connectionString = env . POSTGRES_URL ?? env . DATABASE_URL
5-
6- let sslConfig : { rejectUnauthorized : boolean ; ca : string } | undefined
7- if ( env . DATABASE_SSL_CERT ) {
8- sslConfig = { rejectUnauthorized : true , ca : env . DATABASE_SSL_CERT }
9- }
10-
114export default {
125 schema : './db/schema.ts' ,
136 out : './db/migrations' ,
147 dialect : 'postgresql' ,
158 dbCredentials : {
16- url : connectionString ,
17- ssl : sslConfig ,
9+ url : env . DATABASE_URL ,
1810 } ,
1911} satisfies Config
Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ export const env = createEnv({
1616
1717 server : {
1818 // Core Database & Authentication
19- DATABASE_URL : z . string ( ) . url ( ) , // Primary database connection string (without SSL cert)
20- DATABASE_SSL_CERT : z . string ( ) . optional ( ) , // SSL certificate content for database connection
19+ DATABASE_URL : z . string ( ) . url ( ) , // Primary database connection string
2120 BETTER_AUTH_URL : z . string ( ) . url ( ) , // Base URL for Better Auth service
2221 BETTER_AUTH_SECRET : z . string ( ) . min ( 32 ) , // Secret key for Better Auth JWT signing
2322 DISABLE_REGISTRATION : z . boolean ( ) . optional ( ) , // Flag to disable new user registration
You can’t perform that action at this time.
0 commit comments