Data models,
as plain text.
bluep is a data modeling tool. It keeps a database schema as readable files in git, and generates DDL, migrations and documentation for twelve databases.
Read the tutorialentity customer {
description "A registered buyer."
term Customer
attribute id : bigint not null
attribute email : domain email
attribute full_name : text(200) not null
attribute created_at : timestamptz not null default expr "now()"
key primary pk_customer (id)
key unique uq_customer_email (email)
}CREATE TABLE public.customer (
id bigint NOT NULL GENERATED ALWAYS AS IDENTITY,
email varchar(320) NOT NULL,
full_name varchar(200) NOT NULL,
created_at timestamp with time zone NOT NULL DEFAULT now(),
CONSTRAINT pk_customer PRIMARY KEY (id),
CONSTRAINT uq_customer_email UNIQUE (email),
CONSTRAINT ck_customer_email CHECK (email ~ '^[^@]+@[^@]+$')
);Reviewed like code
One canonical text format, so a schema change is a diff. Model-aware three-way merge and reviews are built in.
Diff and migrate
Compare a model with another version or a live database, and write ordered migration scripts.
Drift
Report where a deployed database has moved from the model, and pull approved changes back.
Twelve databases
Generate and import DDL for PostgreSQL, MySQL, SQL Server, Oracle, Snowflake, BigQuery and six more.
Documentation
A static data dictionary and SVG or PDF diagrams, generated from the same model.
Local
One binary with a browser editor. No server, no account. It connects only to databases you name.
Databases
| Database | Support |
|---|---|
| PostgreSQL | DDL, import, diff, migration, live database |
| SQLite | DDL, import, diff, migration, live database |
| MySQL | DDL, import, diff, migration, live database |
| SQL Server | DDL, import, diff, migration, live database |
| Oracle | DDL, import, diff, migration, live database |
| Snowflake | DDL, import, diff, migration, live database |
| BigQuery | DDL, import, diff, migration, live database |
| Redshift | DDL, import, diff, migration, live database |
| Databricks | DDL, import, diff, migration, live database |
| Db2 | DDL, import, diff, migration, live database |
| Teradata | DDL, import, diff, migration, live database |
| MongoDB | Document validators, indexes, import, diff, migration |
Install
Not released yet. bluep will ship as a single binary for macOS and Linux. Until then, see the examples.