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.