musicle-svelte/drizzle.config.ts

29 lines
984 B
TypeScript
Raw Permalink Normal View History

2024-12-26 18:49:41 +00:00
import { defineConfig } from 'drizzle-kit';
/* ------------------------------- !IMPORTANT ------------------------------- */
/* ---------------- Before running migrations or generations ---------------- */
/* ------------------ make sure to build the project first ------------------ */
/* -------------------------------------------------------------------------- */
export default defineConfig({
out: './drizzle',
schema: './src/lib/server/api/databases/postgres/drizzle-schema.ts',
breakpoints: false,
strict: true,
verbose: true,
dialect: 'postgresql',
casing: 'snake_case',
dbCredentials: {
host: process.env.DATABASE_HOST || 'localhost',
port: Number(process.env.DATABASE_PORT) || 5432,
user: process.env.DATABASE_USER,
password: process.env.DATABASE_PASSWORD,
database: process.env.DATABASE_DB || 'boredgame',
ssl: process.env.DATABASE_HOST !== 'localhost',
2024-12-26 18:49:41 +00:00
},
migrations: {
table: 'migrations',
schema: 'public',
},
2024-12-26 18:49:41 +00:00
});