apps/api gains Prisma (instance_settings as the first model) with the initial migration applied automatically at startup via prisma migrate deploy, a lazy-connecting PrismaService, and GET /api/v1/readyz reporting named checks (database reachable, migrations applied) with 200/503. DATABASE_URL joins the validated environment schema; MIGRATE_ON_START=false skips deploys for tests and tooling. An idempotent seed script and a Compose dev overlay with PostgreSQL (host port 5434 — 5433 is taken locally) complete the loop. Closes #3 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
9 lines
206 B
SQL
9 lines
206 B
SQL
-- CreateTable
|
|
CREATE TABLE "instance_settings" (
|
|
"key" TEXT NOT NULL,
|
|
"value" JSONB NOT NULL,
|
|
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
|
|
CONSTRAINT "instance_settings_pkey" PRIMARY KEY ("key")
|
|
);
|