Upgrading
Move an app up one release at a time, starting from the release you’re on.
Upgrading from 0.11 to 0.12
In 0.12, a Postgres UUID column is a uuid attribute. Upgrade in one step.
Regenerating the schema
On Postgres, regenerate your schema:
npx arbor schema
Each UUID column becomes a uuid attribute, so a query with an id that isn’t a UUID finds nothing, where Postgres used to refuse it with an error. Assigning one throws TypeError. Until you regenerate the schema, arbor schema --check reports it as out of date. On D1, nothing changes.
Upgrading from 0.10 to 0.11
In 0.11, the library is Arbor. Its package is @forestfuture/arbor, and its arbor command reads arbor.jsonc. Its behavior is the same. Upgrade in six steps.
Replacing the package
Remove the old package, then install Arbor:
npm uninstall @forestfuture/active-record
npm install @forestfuture/arbor@^0.11.0
Changing imports
Import from @forestfuture/arbor where you imported from @forestfuture/active-record. Its entries keep their names: /d1, /postgresql, /adapter, and /cli.
import { ArborError, Model } from "@forestfuture/arbor";
import { connect } from "@forestfuture/arbor/d1";
ActiveRecordError is now ArborError. If your Vitest config inlines the library (server.deps.inline), inline @forestfuture/arbor instead.
Renaming the config file
Rename active-record.jsonc to arbor.jsonc, and point its $schema at the new package:
{
"$schema": "./node_modules/@forestfuture/arbor/config-schema.json",
"databases": {
"DB": { "adapter": "d1" },
},
}
Running arbor
The command is arbor. active-record and ffar are gone, so change your scripts and CI:
npx arbor migrate
The console keeps its history in .wrangler/arbor-history, and on Postgres the command keeps its files in node_modules/.cache/arbor. The old files aren’t read, so you can delete them.
Reinstalling the agent skill
The agent skill is now arbor. Install it again:
npx skills add forestfuture/arbor
Regenerating the schema
Regenerate your schema:
npx arbor schema
Its imports change to @forestfuture/arbor. Until you regenerate it, arbor schema --check reports it as out of date.