mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 21:04:03 +00:00
feat(db): add rent_payment_destinations column and multi-schema support
- Add migration 0020 for rent_payment_destinations jsonb column - Add DB_SCHEMA env var support for multi-schema deployments - Create custom migrate.ts script with proper search_path handling - Update drizzle.config.ts and client.ts to use DB_SCHEMA - Add db_schema variable to Terraform with dev=test/prod=public defaults - Update CD workflow to set DB_SCHEMA based on branch
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import { defineConfig } from 'drizzle-kit'
|
||||
|
||||
const dbCredentials = process.env.DATABASE_URL
|
||||
? {
|
||||
url: process.env.DATABASE_URL
|
||||
}
|
||||
: undefined
|
||||
|
||||
export default defineConfig({
|
||||
dialect: 'postgresql',
|
||||
schema: './packages/db/src/schema.ts',
|
||||
out: './packages/db/drizzle',
|
||||
dbCredentials
|
||||
dbCredentials: {
|
||||
url: process.env.DATABASE_URL!
|
||||
},
|
||||
migrations: {
|
||||
schema: process.env.DB_SCHEMA || 'public',
|
||||
table: '__drizzle_migrations'
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user