-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdrizzle.config.ts
More file actions
27 lines (25 loc) · 1.02 KB
/
drizzle.config.ts
File metadata and controls
27 lines (25 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import process from 'node:process'
import { defineConfig } from 'drizzle-kit'
// drizzle-kit config.
//
// Two regimes coexist:
// * Legacy editor tables (event_logs, workspace_minutes_v2, etc.) were
// created by Alembic and are stable in production. `drizzle-kit
// generate` will diff them on first run — review the emitted SQL and
// drop any redundant CREATE TABLE statements before applying.
// * New tables (machines, projects, agent_*) are Drizzle-owned going
// forward. Generate SQL with `pnpm drizzle-kit generate` and apply
// via the files under `server/db/migrations/`.
export default defineConfig({
schema: './server/db/schema.ts',
out: './server/db/migrations',
dialect: 'postgresql',
dbCredentials: {
host: process.env.POSTGRES_HOST ?? 'localhost',
port: Number(process.env.POSTGRES_PORT ?? 5432),
user: process.env.POSTGRES_USER ?? 'postgres',
password: process.env.POSTGRES_PASSWORD ?? 'postgres',
database: process.env.POSTGRES_DB ?? 'postgres',
ssl: false,
},
})