Skip to main content
Batoi RAD Docs

Data Access and Migrations

Manage persistence changes with explicit schemas, scoped queries, and reversible release practices.

Version 1.x Active framework documentation Reviewed Jul 21, 2026 Next review Oct 21, 2026

Owner: Batoi Engineering Reviewed by: Batoi RAD Maintainers Source revision: bb9902c

Browse Batoi RAD Documentation Data Access and Migrations

Data Access and Migrations

Persistence belongs behind application services that understand the current tenant or workspace, authorization context, and record lifecycle.

Query Safety

Use parameterized database operations, select only required fields, and apply scope conditions to every workspace-owned operation. Never treat a browser-provided identifier as proof of access.

Migration Discipline

Each schema change should be reviewed, ordered, repeatable, and paired with a deployment decision. Before promotion:

1. Confirm the change against the supported database versions. 2. Estimate locking and data-backfill impact. 3. Take a consistent backup when rollback depends on data restoration. 4. Apply in a representative environment. 5. Verify both the schema and the affected user workflow.

Do not rewrite a migration that has already been applied. Add a new migration that moves the schema forward.