// automated schema
Database Migrations Engine
The floz db interface eliminates dependency reliance on ORM tooling like Diesel CLI or Goose. Under the hood, it drives the Structural Fingerprinting Engine defined within floz-orm.
Overview: Never write SQL up.sql and down.sql manually again. floz compares the latest Rust struct Abstract Syntax Trees natively against the LIVE Postgres metadata schema and patches the difference over the wire inline!
Workflow
Once you make adjustments to your #[model] schemas:
- Run
floz db generate. This freezes your local code structs into a unified flatschema.jsonfile. - Run
floz db migrate. This triggers the engine to extract table schemas, add columns, mutate columns, and deploy indices automatically matching your target `DATABASE_URL`.
Alpha Warning: Currently schema rollback transitions warn users aggressively before committing modifications to the backend databases. Validate heavily in non-production instances first initially.