From 87e99e487eb4ba62f4c7ba32abd4b406cdc3f741 Mon Sep 17 00:00:00 2001 From: Padreug Date: Sat, 20 Jun 2026 20:50:21 +0200 Subject: [PATCH] docs: correct prisma-engines + migrate-on-boot accuracy in runbook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - nix devShell uses nixos-25.05's prisma-engines 6.7.0 (has libquery_engine.node) — the 7.x problem is the system/unstable channel only, not the flake's devShell (corrects an earlier overstatement; #30 closed as invalid). - start.js migrate-on-boot is a no-op on nix but IS the migration path on docker (image ENTRYPOINT) — don't assume it's dead everywhere (#31). Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/runbook-migrations.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/runbook-migrations.md b/docs/runbook-migrations.md index 9c1dcac..0eee37e 100644 --- a/docs/runbook-migrations.md +++ b/docs/runbook-migrations.md @@ -56,10 +56,16 @@ wipe loses ACL/pairing state, never keys. LNbits holds the bunker **admin nsec** ## Schema migrations -Migrations are applied by the deploy's `prisma migrate deploy`, **not** by the -daemon on boot — the in-`start.js` `npm run prisma:migrate` step is a no-op -(tracked in #31). After adding a migration, make sure the deploy applies it. +On the **nix deploy**, migrations are applied by the deploy's `prisma migrate +deploy`, not by the daemon — `start.js`'s `npm run prisma:migrate` step fails in +the read-only nix store (no `npm` on PATH) and is a redundant no-op there (#31). +On **docker**, by contrast, `start.js` IS the migration path (it's the image +`ENTRYPOINT`), so the step is not dead everywhere. After adding a migration, make +sure the path that applies for your target actually runs it. -Prisma on NixOS needs the engine env pinned to `prisma-engines_6` (the bare -`prisma-engines` attr is now 7.x with no `libquery_engine.node`; devShell fix -tracked in #30). The deploy's `package.nix` already pins `_6`. +Prisma on NixOS: the flake pins **nixos-25.05**, whose `prisma-engines` is +**6.7.0** (ships `libquery_engine.node`) — both the devShell and the deploy's +`package.nix` use it, so `prisma` (and the `npm run test:integration` suite) work +in `nix develop` out of the box. Heads-up: on **nixos-unstable / a system +`` channel**, the bare `prisma-engines` attr is 7.x with no +`libquery_engine.node`; don't run the repo's prisma against an unstable channel.