PostgreSQL applications
Use backify new <name> --template web|api|worker and @backifydev/sdk/app for server-only PostgreSQL. database() exposes a standard node-postgres pool; transaction() and withUser() support atomic work and explicit RLS context. An ORM can wrap the same standard connection, but the app owns schema and authorization.
Declare database migrations and masked sensitive columns in backify.config.ts. Add versioned SQL files in db/migrations, run backify lock, and commit its checksum catalog. Never edit an applied migration. Hosted migration/runtime/inspection roles have separate credentials and grants; apps receive no cloud identity credentials.
npm run dev starts private PostgreSQL 16+ and the same SDK migration/runtime schema locally. Keep .backify/ ignored. Test anonymous rejection, ownership isolation, input validation, constraints and transactions against the actual local database before preview delivery.
The portal data browser uses an inspection role, masks declared columns and audits authorized row reads. Removing the database declaration retains stateful data until confirmed deletion. See database, local development, and the runtime contract.