v0.1.61 · Apache-2.0 · Rust
Define schemas.
Forget migrations.
Vespertide is a declarative database schema manager for Rust. Write your tables in JSON, and let it diff, plan, and emit type-safe migrations to Postgres, MySQL, and SQLite — automatically.
$cargo install vespertide-cli
v0.1.61Version
3Databases
4ORM exports
0msRuntime cost
models/user.json
{
  "$schema": "https://raw.githubusercontent.com/dev-five-git/vespertide/main/schemas/model.schema.json",
  "name": "user",
  "columns": [
    { "name": "id", "type": "integer", "primary_key": true },
    { "name": "email", "type": "text", "unique": true, "index": true },
    { "name": "name", "type": { "kind": "varchar", "length": 100 } },
    {
      "name": "status",
      "type": { "kind": "enum", "name": "user_status",
                "values": ["active", "inactive", "banned"] },
      "default": "'active'"
    },
    { "name": "created_at", "type": "timestamptz", "default": "NOW()" }
  ]
}
— FeaturesBuilt for teams who'd ratherreview schemasEverything Vespertide does is reversible, inspectable, and committed to git as plain JSON. No magic, no runtime surprises.
Declarative schemaDescribe your desired database state in JSON files. The current model is the source of truth.
Automatic diffingVespertide replays applied migrations and compares them to your models to compute changes.
Typed migration plansGenerates safe, portable MigrationAction enums — not raw SQL. Review before you commit.
Multi-databasePostgreSQL, MySQL, and SQLite — same schema, identical semantics, backend-aware quoting.
Native enumsFirst-class string and integer enums. Add new integer values without ever touching the DB.
Zero-runtime macrovespertide_migration!() generates database-specific SQL at compile time. Nothing to ship at runtime.
JSON Schema validationShips with JSON Schemas — autocomplete, hover docs, and instant errors in your editor.
ORM exportOne command emits SeaORM, SQLAlchemy, Django, GORM and more — entities stay in lockstep with schema.
Built in RustSingle binary CLI, no Node, no Python, no JVM. cargo install vespertide-cli and you're done.
— How it worksFive steps fromJSON to SQL.The whole pipeline is deterministic. Every artifact is a plain file you can read, review, and version-control.
01DefineAuthor JSON models in your editor with full IDE validation via JSON Schema.
models/user.json
02ReplayVespertide reconstructs the baseline schema by replaying applied migrations.
migrations/*.sql
03DiffCurrent models are compared to the baseline to find what changed.
vespertide diff
04PlanDifferences are converted into typed MigrationAction enums.
MigrationAction
05EmitActions translate to dialect-specific SQL — Postgres, MySQL, or SQLite.
vespertide sql
— ExamplesOne source of truth,
four ways to use it.
Your JSON models drive the diff, the SQL, the ORM entities, and the runtime macro. Pick the workflow that fits your team — Vespertide stays consistent.
→Models.Inline foreign keys, enums, and constraints — no separate schema language.
→CLI.diff, sql, revision, status, log — every step is a plain command.
→Runtime.Compile-time macro, zero overhead, no migrations folder shipped to prod.
→Export.SeaORM, SQLAlchemy, Django, GORM and more — typed entities, generated.
models/post.json~/projects/blogsrc/main.rs$ vespertide export
{
  "$schema": "https://raw.githubusercontent.com/dev-five-git/vespertide/main/schemas/model.schema.json",
  "name": "post",
  "columns": [
    { "name": "id", "type": "integer", "primary_key": true },
    { "name": "title", "type": { "kind": "varchar", "length": 200 } },
    { "name": "body", "type": "text" },
    {
      "name": "author_id",
      "type": "integer",
      "foreign_key": {
        "ref_table": "user",
        "ref_columns": ["id"],
        "on_delete": "cascade"
      },
      "index": true
    },
    {
      "name": "status",
      "type": { "kind": "enum", "name": "post_status",
                "values": ["draft", "published", "archived"] },
      "default": "'draft'"
    }
  ]
}
# Initialize a new project
$ vespertide init

# Scaffold a model
$ vespertide new post

# Edit models/post.json, then preview the diff
$ vespertide diff
+ create_table post (id, title, body, author_id, status)
+ create_enum post_status [draft, published, archived]
+ create_index ix_post_author_id ON post (author_id)

# Inspect dialect-specific SQL
$ vespertide sql --backend postgres

# Persist as a migration file
$ vespertide revision -m "create post table"
use sea_orm::Database;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let db = Database::connect("postgres://user:pass@localhost/mydb").await?;

    // Generated at compile time, run on startup.
    vespertide::vespertide_migration!(db).await?;

    Ok(())
}
# Generate Rust SeaORM entities
$ vespertide export --orm seaorm

# Or Python — SQLAlchemy
$ vespertide export --orm sqlalchemy

# Or FastAPI-flavoured SQLModel
$ vespertide export --orm sqlmodel

# Or Go — GORM
$ vespertide export --orm gorm

# Or Django
$ vespertide export --orm django
— CompatibilityThree databases,one schema.Vespertide emits backend-specific SQL from the same JSON model. Switch databases for tests, staging, or production without rewriting a thing.
PG
PostgreSQL
"identifier"Full feature support — native enums, JSONB, INET, CIDR, TSVECTOR.
MY
MySQL
`identifier`Full feature support with MySQL-aware identifier quoting and types.
SL
SQLite
"identifier"Full feature support — perfect for tests, CLIs, and embedded apps.
— ORM exportGenerate typed entities for the runtime you use.vespertide export --orm <target> emits up-to-date entities from your current models.
RustSeaORM
PythonSQLAlchemy
PythonSQLModel · FastAPI
PythonDjango
JavaJPA · Hibernate
TypeScriptPrisma
TypeScriptDrizzle
GoGORM
— Get startedInstall once. Iterate forever.Vespertide is open source under Apache-2.0 and built in public. Join the community, file an issue, or pair with us in Discord.
$cargo install vespertide-cli
Apache-2.0 · v0.1.61 · crates.iobuilt with Rust · maintained in Seoul
문의 및 의견 제출
contact@devfive.kr
Copyright © DEVFIVE. All Rights Reserved.
DEVFIVE