Skip to content

Schema, draft and versions

The schema is the definition of all collections (fields, rules, views, automations, flows, sites) in a JSON manifest, heskala.collections. Large changes are made in a draft («Development», Desarrollo) and applied to production with a deploy. Each deploy is saved as a version.

  1. Go to Settings → Collections → Schema (Esquema) to see the collections on a canvas.
  2. Switch to Development: a copy of production is created that you can edit without affecting anyone.
  3. Open «Development and versions» (Desarrollo y versiones) to edit the JSON, test it, see the plan and deploy.
  4. From the history you can load an earlier version into the draft and deploy it again.
  5. To export a group of collections as an app: Settings → Collections → «Export as app».
  • Only an administrator deploys.
  • A deploy runs in a single transaction and is saved as a new version. It never deletes data or changes field types.
  • There is one draft per company: if someone else has one open, do not overwrite it.
  • An imported file cannot exceed 1 MB.

Recommended order:

  1. get_schema_draft (or start_schema_draft if there is none).
  2. patch_schema_draft with all operations together. Avoid save_schema_draft: it rewrites the whole manifest.
  3. plan_schema_draft: review the risks and tell the person.
  4. deploy_schema_draft only after they confirm.

Others: discard_schema_draft, list_schema_versions, restore_schema_version (loads a version into the draft) and export_schema.