gize-db 0.7.0

Data-layer conventions and SQLx migrations for Gize. See ADR-003 / ADR-011.
Documentation

gize-db

Migrations and data-layer conventions for the Gize framework.

Crates.io License

gize-db owns Gize's migration runner on top of SQLx. See ADR-003, ADR-011 and ADR-015.

  • migrate: a synchronous wrapper around SQLx's runtime Migrator. It loads migrations/*.sql, tracks applied versions in _sqlx_migrations, and applies pending ones in order. It runs against both PostgreSQL and SQLite through SQLx's Any driver, so one code path serves either database. There is no risky runtime auto-migration: SQL is generated and reviewed, then applied on demand.

The database-specific SQL (column types, primary keys, placeholders) is generated from gize_core::Dialect; the SQLx pool wiring lives in the generated app code, not here.

Usage

[dependencies]
gize-db = "0.7"

Part of the Gize workspace

Crate Role
gize-core Domain model, manifest, dialect, conventions
gize-generator Codegen engine: safe writer, sync, plugins
gize-templates Templates for the generated code
gize-db Migrations, PostgreSQL and SQLite (this crate)
gize The gize CLI

License

Licensed under either of Apache-2.0 or MIT at your option.