openreader/drizzle.config.pg.ts
Richard R bb853acaf6 Refactor authentication schema and database handling
- Updated SQLite journal metadata with new tag and timestamp.
- Refactored account deletion API to utilize Better Auth's built-in user deletion method for cascading cleanup.
- Enhanced database initialization to include authentication schemas for both SQLite and Postgres.
- Removed user, session, account, and verification tables from the Drizzle schema, as they are now managed by Better Auth.
- Created separate schema files for authentication in both Postgres and SQLite.
- Added SQL migration scripts for creating necessary tables in both database systems.
2026-02-15 12:49:23 -07:00

19 lines
517 B
TypeScript

import type { Config } from 'drizzle-kit';
import * as dotenv from 'dotenv';
dotenv.config();
let url = process.env.POSTGRES_URL;
if (!url) {
console.warn('[drizzle.config.pg.ts] POSTGRES_URL is not set; using a placeholder URL.');
url = 'postgresql://placeholder:placeholder@localhost:5432/placeholder';
}
export default {
schema: ['./src/db/schema_postgres.ts', './src/db/schema_auth_postgres.ts'],
out: './drizzle/postgres',
dialect: 'postgresql',
dbCredentials: {
url,
},
} satisfies Config;