Repository navigation
v1.2.0
Schema as code
iglo.base 1.2.0 can keep the database schema in a file in your repository, iglo.schema.json. The guide is docs/schema.md.
schema pullwrites the current schema to the file. Collections and fields are keyed by name, with no ids and no secrets.serve --schemaapplies the file at startup.- A backup (
pre-schema-*.zip) is made first, and the three newest are kept. - Every change runs in one transaction, and existing records are checked against the new rules.
- Dropping data is refused without
--allow-data-loss.
- A backup (
schema planshows what would change without changing anything.schema typesgenerates TypeScript types for the SDK (@iglo.tech/iglo.base) and its SSR clients.--checkis for CI.- TypeScript data migrations in
migrations/have typed record helpers. Renames of fields and collections are declared in a migration and keep the data. --mode dev|prod(defaultdev):- In dev mode, dashboard changes are written back to the file, and edits to the file apply immediately.
- In prod mode, collections and settings are locked: they answer 403, and the dashboard shows them read-only.
- OAuth2 providers can be in the file, with their secrets as environment references (
{"env": "NAME"}).
Without --schema, nothing changes: the server behaves as 1.1.0. The data stays compatible with PocketBase v0.41.0.
The SDK is released separately as @iglo.tech/iglo.base 1.0.1 on npm.
linux-x64 and linux-arm64 executables, and the JSON Schema of the schema file (iglo.schema.json). Verify with: sha256sum -c SHA256SUMS.