gize-db 0.3.0

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

gize-db

Data-layer conventions and migrations for the Gize framework.

Crates.io License

gize-db centralizes Gize's data-layer conventions on top of SQLx and PostgreSQL (see ADR-003 and ADR-011).

Its MVP scope is intentionally thin:

  • pg_column_type — the single source of truth mapping Gize field types to PostgreSQL column types, reused by the migration templates and (future) migration diffing.
  • 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. There is no risky runtime auto-migration.

The SQLx pool wiring lives in the generated app code, not here.

Usage

[dependencies]
gize-db = "0.2"

Part of the Gize workspace

Crate Role
gize-core Domain model & conventions
gize-generator Codegen engine
gize-templates Templates for generated code
gize-db Data-layer conventions + migrations (this crate)
gize The gize CLI

License

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