Documentation

Models

Updated
Browse documentation

Published 2026-08-13. V2 is a prerelease; the web core is release-gated and other previews are named separately. What beta means.

Read this page as HTML, Markdown, or structured JSON—or open the published Markdown with an AI assistant. Gemini receives the prompt through your clipboard because its signed-out page does not reliably prefill URL text; paste when the new tab opens. External assistants need the public site URL.

Models in Amber V2

Amber CLI 2.0.6 installs Grant and the selected database driver in the supported web template. SQLite is the zero-setup default; PostgreSQL and MySQL are selected with amber new APP -d pg or -d mysql.

Grant is the supported V2 model layer. The generated shard.yml pins the reviewed Grant commit, config/database.cr registers the primary connection, and amber database applies Micrate migrations under db/migrations/.

Generate the first complete model and resource from the application root:

Run from: the application root beside shard.yml.

Terminal
amber generate scaffold Pet name:string:required species:string:required adopted:bool
amber database migrate

If you are migrating an Amber 1 application, keep the 1.4.1 documentation open for the existing Granite or Jennifer code and use the Granite-to-Grant guide only after reviewing its compatibility notice and proving a database restore.