Files
e402384121 feat: Skif v1 — preferences, booking lifecycle, explainable matching, safety plan (#2)
* chore(tooling): add drizzle, auth, zod, vitest, eslint and verify script

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(domain): config SSOT, booking state machine, explainable matching, safety plan

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(db): schema with no users table, initial migration, local migrate

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(app): customer, protector and ops flows end to end on OrangeCat OIDC

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* docs: describe what works, layout, local run and production env

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Mao Nakamoto <maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 13:39:58 -07:00

16 lines
561 B
TypeScript

/**
* Apply committed migrations to DATABASE_URL — for a local database only.
* On the box, the deploy pipeline applies them (loki's apply-schema.sh).
*/
import { drizzle } from "drizzle-orm/node-postgres";
import { migrate } from "drizzle-orm/node-postgres/migrator";
import { Pool } from "pg";
const url = process.env.DATABASE_URL;
if (!url) throw new Error("DATABASE_URL is not set");
const pool = new Pool({ connectionString: url });
await migrate(drizzle(pool), { migrationsFolder: "drizzle" });
await pool.end();
console.log("migrations applied");