mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
The three final pre-dogfood items: 1. drizzle.config: schemaFilter now includes 'broadcast' alongside 'mail'. Without this, `bun run db:push` skipped the broadcast tables — schema existed in code but not in Postgres. Tested via db:push + psql \dt (3 tables created: campaigns, events, sends). 2. .env.development: new MANA-MAIL SERVICE section with Stalwart knobs + broadcast config (tracking secret, rate limits, send throttle). DEV secret is explicitly labelled non-production — prod rotates via env. 3. generate-env.mjs: new block writes services/mana-mail/.env on `pnpm setup:env`. Mirrors the invoices / research / events pattern. All 16 broadcast/mail vars flow through from SSOT. Verified end-to-end: - pnpm setup:env → services/mana-mail/.env contains BROADCAST_TRACKING_SECRET + rate limits - bun run src/index.ts → /health returns 200 with the new config - psql → broadcast.campaigns / events / sends are materialised Broadcast module is now fully ready to send real mail — nothing else required before the first dogfood campaign. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
14 lines
519 B
TypeScript
14 lines
519 B
TypeScript
import { defineConfig } from 'drizzle-kit';
|
|
|
|
export default defineConfig({
|
|
schema: './src/db/schema/*.ts',
|
|
out: './drizzle',
|
|
dialect: 'postgresql',
|
|
dbCredentials: {
|
|
url: process.env.DATABASE_URL || 'postgresql://mana:devpassword@localhost:5432/mana_platform',
|
|
},
|
|
// Scope to just the schemas mana-mail owns. Other services (mana-auth,
|
|
// mana-research) manage their own pgSchemas; pushing all would
|
|
// accidentally drop foreign rows on each service's next migration.
|
|
schemaFilter: ['mail', 'broadcast'],
|
|
});
|