Skip to content

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 07:51
· 19 commits to main since this release
335ffd9

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 pull writes the current schema to the file. Collections and fields are keyed by name, with no ids and no secrets.
  • serve --schema applies 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.
  • schema plan shows what would change without changing anything.
  • schema types generates TypeScript types for the SDK (@iglo.tech/iglo.base) and its SSR clients. --check is 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 (default dev):
    • 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.