Changelog
Generated from CHANGELOG.md in the project repository. Never maintained twice.
Unreleased
- addedCLI: coloured, grouped output for lint/validate, plan and migration views via runemark;
--color auto|always|nevercontrols it,NO_COLORis honoured, and--json,--format json|sarifand generated artifacts never contain colour codes. - addedCLI:
databee initcreates a project,databee inspectsummarizes it and reports diagnostics, and--jsonprints a single machine-readable object for every command. - addedCLI:
databee pullreads a PostgreSQL 15–19 database into the project. Repeated pulls keep model IDs, including for tables and columns renamed in the database. Sequences owned by a column (serial,bigserial,smallserial,OWNED BY) are read into the column; all other sequences are reported asDB-INT-001. - addedCLI:
databee connection listanddatabee connection testuse local connection profiles that stay outside the project and never show passwords. - addedCLI:
databee generate ddlwrites PostgreSQL DDL from the project without a running database, includingCREATE SEQUENCEandOWNED BYfor sequences owned by a column. - addedCLI:
databee validatechecks project files and the model structure, and--fixapplies safe corrections. - addedCLI:
databee lintchecks PostgreSQL best practices with configurable severities and suppressions that need a reason.--fixapplies safe corrections, and--format sarifproduces output for CI.PG016warns about a default that callsnextvalof a sequence the model does not know. - addedCLI:
databee lintreportsPG017as an error for PostgreSQL identifiers longer than 63 bytes (or equal to another after truncation), which PostgreSQL would silently shorten. - addedCLI:
databee visualize erddraws the model as a Mermaid or Graphviz DOT entity relationship diagram, with keys and cardinalities, and uses positions fromdiagrams/layout.jsonfor DOT. - addedCLI:
databee generate dbmlwrites the model as DBML, anddatabee import dbmlreads a DBML file into an empty project and reports unsupported constructs with their line. - addedCLI:
databee snapshotstores the current model as an immutable snapshot that later diffs and ALTER plans start from. - addedCLI:
databee generate alterplans the PostgreSQL changes between two model stages asplans/<name>.jsonand.sql, using lock-friendly steps (concurrent indexes,NOT VALIDplusVALIDATE) and flagging destructive, rewriting and backfill steps. - addedCLI:
databee plan showlists the steps, risks and hash of a plan, anddatabee plan approverecords a human approval for that exact plan hash outside the project; it needs a terminal and has no--yesflag. - addedCLI:
databee plan applyruns an approved plan against a database after checking that the database still matches the plan's source model, continues an interrupted run after the last completed step, and compares the database with the target model at the end. - addedCLI:
databee visualize renderdraws the model as a deterministic SVG or HTML diagram (viewserd,focus,diff,overview; light, dark and print themes).--view diffmarks the changes since a snapshot, and--openopens the file only in an interactive terminal. - addedMCP:
databee mcp serve --transport stdio --project <path>starts a Model Context Protocol server with the toolsschema_summary,schema_validate,schema_visualizeandschema_diff. They never change the model;schema_visualizewithoutput: truewrites only belowdiagrams/of the project and rejects any other location.skills/databee/SKILL.mdtells agents when to use which tool. - addedProject format: the model is stored as one JSON file per entity with stable IDs, and every file references a JSON Schema for editors and agents.
- addedCLI:
databee changeset apply <file|->applies a JSON changeset (operations such asadd_entity,add_foreign_keyandrename_field, withreflabels for new objects) to the model as a whole or not at all. It checks the model revision, validates, writes atomically, and leaves every file unchanged if it rejects the changeset.--dry-runwrites nothing. - addedCLI:
databee undotakes the last changeset back,databee revisionprints the model revision, anddatabee changeset schemaprints the JSON Schema of changesets. - addedMCP:
databee mcp serve --profile <name>(repeatable) adds tools to the defaultreaderprofile:designer(schema_apply_changeset,schema_undo,schema_add_entity,schema_add_field,schema_add_foreign_key),generator(generate_ddl,generate_dbml,generate_code),planner(schema_snapshot,plan_generate_alter,plan_show) andoperator(plan_apply). No profile can approve a plan, andplan_applyruns only a plan whose current hash a human approved. - addedMCP:
schema_getreturns the model with IDs and its revision as structured JSON, and every reply that carries model or database text is marked"content_origin": "data". - addedProject format: changesets keep an undo history in
.databee/history/, anddatabee initadds.databee/to the project's.gitignore. DiagnosticsDB-CHG-001toDB-CHG-004report rejected changesets and undo refusals. - addedCLI:
databee undo --dry-runreports whether undo is possible and which changeset it would take back, and writes nothing. - addedMCP:
schema_undoacceptsdry_runto report whether undo is possible without changing the model. - addedCLI:
databee generate code --lang rust|typescript|python|csharpwrites sqlx structs, a Drizzle schema, SQLAlchemy 2.0 models or EF Core entities with aDbContexttogenerated/<lang>/(or--output <dir>). What a library cannot carry is reported asDB-GEN-001toDB-GEN-007on the model object. - addedCLI:
databee studio [path]opens a project in the installed databee studio app:databee-studioonPATH, elsedatabee Studio.appin/Applicationsor~/Applications. Without the app it says so and exits. - addedStudio: databee studio, a Tauri desktop app in
studio/, opens a project and shows its entity relationship diagram with columns, keys, foreign key edges and finding counts per entity. Positions come fromdiagrams/layout.jsonor an automatic layout, dragging an entity saves its position, and a banner offers a reload when the project changed on disk. Editing follows later. - addedStudio:
pnpm dev:mockinstudio/uiruns the interface in a normal browser against a fixture project, without Tauri. - addedStudio: the diagram shows PostgreSQL types as the renderer spells them (
bigint,numeric(10,2),varchar(254)), crow's foot cardinality markers on foreign key edges that attach at the key columns on the facing sides of the boxes, and edges that stay visible in dark mode. - addedStudio: entities, columns, primary and unique keys, indexes, foreign keys (also over several columns), enum types (create, change values), check constraints and namespaces (chosen when creating an entity) are edited in the side panel. Dragging from a column handle onto a column of another entity creates a foreign key with
ON DELETEandON UPDATEchoices. Every edit is a changeset checked with a dry run first;Deletedrops the selection after a confirmation that names the foreign keys of other entities dropped with it, and Undo takes back the last step. - addedStudio: foreign key edges use the same router as the SVG renderer (orthogonal, own lanes, around boxes), compiled to WebAssembly and rerouted while you drag; building the studio needs
wasm-pack. The packaged app loads the router too, so foreign key lines are routed around entities instead of crossing them. - addedStudio: the diagram works from the keyboard: entities and foreign keys show a focus ring and have readable names, and Enter or Space opens the focused one in the side panel.
- addedStudio: findings show at the entity, at the column and in a side panel list, with an Apply fix button where a fix exists. An edit rejected because the project changed meanwhile shows a conflict notice, reloads and is not retried.
- addedStudio: a DDL view with a copy button, snapshots with a name, an ALTER preview from a chosen snapshot with lock, rewrite and destructive flags, and an approval dialog that shows steps, risks and hash and asks for the plan name before a destructive plan is approved.
- addedMCP:
generate_codein thegeneratorprofile returns the generated files inline, or withoutput: truewrites them belowgenerated/of the project only. - addedCLI:
databee export <profile>runs an export profileexports/<name>.toml: row data ascsv,ndjson,sql-insertorsql-copy, streamed from one consistent read-only transaction, plus schema artifacts (ddl,dbml,json-schema,dictionary,diagram). Two runs on unchanged data write identical files andmanifest.json.databee export listanddatabee export check <profile>list and validate profiles. - addedCLI: exports report
DB-EXP-001toDB-EXP-008(reserved masking and subset fields, table without a primary key, details a JSON Schema cannot carry, invalid profile with file and JSON path, unmatched entity pattern, skipped entity, duplicate output, foreign key cycle). SQL exports are ordered parents first (load_orderinmanifest.json) and end withsetvalfor identity and owned sequences. - addedMCP: the
exporterprofile (--profile exporter) addsexport_list,export_check,export_profile_saveandexport_run. Profiles are saved only belowexports/, validated first;export_runwrites only belowout/of the project and rejects links out of it. - addedProject format: export profiles live in
exports/<name>.tomlwithout credentials, with a JSON Schema in.databee/schemas/export.schema.json.databee initaddsout/to the project's.gitignore, because data exports can hold personal data. - addedCLI:
databee pullreads MySQL 8.4 and 9.x, MariaDB 10.11 and 11.4 (mysql://,mariadb://) and SQLite (sqlite:path) databases and takes the dialect from the URL scheme. Tables, columns with their native properties (UNSIGNED,AUTO_INCREMENT, generated columns,ENUM,SET, affinity,STRICT,WITHOUT ROWID), keys, checks, indexes, comments, engine and collations are captured; everything else is reported asDB-INT-001. - addedCLI:
databee generate ddl --dialect postgres|mysql|sqlitewrites DDL for a dialect, by default that of the project. A model of another dialect is emitted from its logical types; what only the other dialect describes is reported asDB-DDL-005toDB-DDL-009. - addedCLI:
databee init --dialect postgres|mysql|sqlitestarts a project of that dialect; an empty project adopts the dialect of the firstpull, a project with objects refuses a connection of another dialect. - addedCLI:
databee exportalso reads MySQL, MariaDB and SQLite from a consistent snapshot, with values normalized to the PostgreSQL text forms.sql-insertis written in the dialect of the project;sql-copyis PostgreSQL only (DB-EXP-009). - addedCLI:
databee lintscopes its rules by dialect:PG001,PG003andPG014apply to every dialect,PG002to PostgreSQL and SQLite,PG005,PG006,PG016andPG017to PostgreSQL only. - addedProject format:
project.tomlhas an optionaldialect(postgresby default) and[extensions.<dialect>]with server settings. Native properties of MySQL and SQLite objects are versioned extensionsmysqlandsqlite. - addedMCP:
generate_ddltakes an optionaldialect. - addedCLI:
scripts/db-matrix.shruns the integration tests against PostgreSQL 15–19, MySQL 8.4 and 9, and MariaDB 10.11 and 11.4 in Docker (DATABEE_TEST_MYSQL_URL,DATABEE_TEST_MARIADB_URL). - addedCLI:
databee transform --to <dialect> --into <dir>derives a project for another dialect (MySQL, MariaDB or SQLite to PostgreSQL first). Each conversion isexact,equivalent,lossy,manualorunsupportedwith reason, file and JSON path (DB-TRF-*); model IDs stay the same. Open decisions give exit code 1. - addedCLI:
databee analyze compatibility --to <dialect>prints the conversion report without writing, anddatabee analyze fitscores the model for PostgreSQL, MySQL/MariaDB and SQLite with the reason of every deduction. - addedProject format: mapping decisions live in
mappings/<source>-to-<target>.toml(JSON Schema in.databee/schemas/mapping.schema.json), globally and per column:TINYINT(1), ENUM and SET,BIGINT UNSIGNED, zero dates,DATETIMEtime zone, case-insensitive unique keys, prefix and FULLTEXT indexes, spatial types. - addedMCP: the
plannerprofile addsschema_transform, which writes only belowout/transform/<name>/, andschema_analyze. - addedCLI:
databee generate ddlfor PostgreSQL writesCREATE EXTENSION, ICU collations and descending index parts that a transformed project needs. - addedCLI:
databee migrate plan --from <source> --to <target>plans a migration with data from MySQL, MariaDB or SQLite into PostgreSQL asmigrations/<name>.jsonwith a hash: schema, one data step per table in load order, then foreign keys, indexes and sequence values. It refuses open decisions and a source that changed since the transformation (DB-MIG-001). - addedCLI:
databee migrate previewshows steps, row counts and risks,databee migrate approverecords a human approval for the plan hash (terminal only, no--yes), anddatabee migrate executecopies the data of an approved plan into an empty target in batches from one consistent snapshot, with the value rules applied. - addedCLI:
databee migrate resumecontinues an interrupted run after the last committed batch; tables without a usable key are copied again. The progress is kept in the target in the transaction of each batch and mirrored to.databee/migrations/<name>/checkpoint.json. - addedCLI:
databee migrate verifycompares row counts, checksums over normalized values, NULL counts, foreign keys and sequence state of source and target. Differences areDB-MIG-100toDB-MIG-104with exit code 1. - addedMCP: the
plannerprofile addsmigration_plan,migration_previewandmigration_verify, theoperatorprofilemigration_executeandmigration_resume; they take connection profile names, work inout/transform/<name>/and run only a plan whose current hash a human approved. There is no tool that approves. - addedCLI: the
zero_datedecision of a mapping now also applies to the data of every date column, not only to zero-date defaults (value rulezero_dateintransform/data-rules.json). - addedCLI:
databee pullreads MongoDB 7.0 and 8.0 (mongodb://,mongodb+srv://): collections with their options,$jsonSchemavalidator and indexes (compound, unique, sparse, TTL, text, partial), and the structure of the documents from a sample. Fields are recursive (embedded objects, arrays), several types in one field are a union with counts, andorigin,confidenceand the reason stand at the field. Views and sharded collections are reported asDB-INT-001, a partial sample asDB-INT-005. - addedCLI:
databee pull --sample-size <n> --sample-mode first|randomsets the sample of a MongoDB database (1000 documents, random by default).firsttakes the first documents by_id, so a second pull of unchanged data changes nothing. - addedProject format: a field is
optionalif a document may lack it, which differs fromnullable(an explicitnull). An inferred field is required only if the validator requires it, or every sampled instance has it and at least 100 documents or the whole collection were sampled. A foreign key can havemeta(origin: inferred,confidence): MongoDB references are found whereObjectIdvalues match the_idof another collection, and are never enforced. - addedCLI:
databee exportwrites a MongoDB collection asndjson, one document per line as relaxed Extended JSON ordered by_id; other formats are refused withDB-EXP-010. - addedCLI:
databee init --dialect mongodbstarts a MongoDB project.lintandvalidatereport nothing relational for collections. - addedCLI:
databee transformconverts MongoDB projects to PostgreSQL and back (--to postgres,--to mongodb). Nothing is guessed: each embedded object or array,ObjectId, multi-type field, inferred reference and relationship is a decision inmappings/,manualuntil decided (DB-TRF-027toDB-TRF-033), with a recommendation from theaccess:lines of the domains. The report explains every relationship, including document size and write paths. - addedCLI:
transform/data-rules.jsongets adocumentspart: rules that cut a document into rows and put rows into documents.explodeandassembleindatabee-transformapply them; running them against databases is not part of this version. - addedCLI:
databee generate ddl --dialect mongodbwrites amongoshscript for a MongoDB project:createCollectionwith a$jsonSchemavalidator (bsonType,requiredonly for required fields, nested properties, array items,enum,maxLength) andcreateIndexfor unique, compound, TTL, text, partial and hashed indexes. The script is deterministic and, applied to an empty database and pulled back, gives the same structure.DB-DDL-011toDB-DDL-014report what the script leaves out or builds from a sample. - addedCLI:
databee analyze fitscores a MongoDB project and adds MongoDB as a fourth target, with the features nested fields, union fields, arrays of objects and optional fields. The capability matrices of all adapters know the capabilitiesNestedField,UnionField,ArrayFieldandOptionalField. - addedCLI: The JSON Schema export of a MongoDB project describes the
ndjsonexport: anObjectIdis{"$oid": …}, a date{"$date": …}, a decimal{"$numberDecimal": …}. - addedProject format: an inferred reference is no constraint anywhere: PostgreSQL, MySQL and SQLite DDL, ALTER plans, migration plans, generated code, lint and DBML leave it out, and the ERD, the dictionary and the rendered diagram show it as inferred (dashed, labeled).
- addedCLI:
scripts/db-matrix.shruns the integration tests againstmongo:7.0andmongo:8.0in Docker (DATABEE_TEST_MONGODB_URL). - addedCLI:
databee exporttakes a subset.where(a SQL predicate),sample({ rows = N }or{ percent = P, seed = S }) andinclude_childrenon a[[data]]entry choose the rows of a root table; the rows they reference are always exported, so every key in the export resolves.subset = "related-only"anddangling = "null"tune the rest; the manifest lists the subset per entity. - addedCLI:
[data.mask]replaces column values withhash,fake(email,name,phone,iban,textand more),null,constant,shift_date,roundorkeep_format. Output keeps type and length, keys stay unique, and columns that reference a masked key follow it. The secret isDATABEE_MASK_KEY, never written; without it a run uses a random key. Reports name the strategy per column, never values. - addedProject format: a field can be marked
sensitive(add_field,alter_field, kept bypull).export checkwarns (DB-EXP-015) when it is exported without amask,--strictstops before writing, and names likeemailget a hint (DB-EXP-016). - addedCLI: exports report
DB-EXP-011toDB-EXP-022for subsets and masks.DB-EXP-001now means an unsupported combination, such as a mask on a MongoDB collection. - addedMCP:
export_profile_save,export_checkandexport_runhandle the subset and mask fields, andexport_runtakesstrict. - addedCLI:
databee generate datamakes synthetic test data from the model without a database:--rowsrows per entity (or an export profile withgenerate), foreign keys only to generated parent rows, unique keys, enums and simple checks respected, the same bytes for the same model and--seed. It runs in the load order of an export, in any export format. - addedCLI: a
[[data]]entry withgenerate = { rows = N }or{ per_parent = "1..5" }makes rows instead of reading them, needs no connection, and[data.columns]sets a fake kind, constant, value list, range or NULL share per column.export checkandmanifest.jsonshow the plan undergenerated. Reported asDB-EXP-023toDB-EXP-027; MongoDB collections are refused (DB-EXP-001). - addedMCP:
export_profile_save,export_checkandexport_runaccept generating profiles and run them without a connection profile. - addedCLI:
databee pullreads SQL Server 2022 (mssql://user:password@host:port/databaseorsqlserver://,?trust_server_certificate=truefor a self-signed certificate) with the Microsoft drivermssql-rs: schemas, tables, columns with types, collations, identity, computed columns, named defaults, checks, keys, foreign keys andMS_Descriptioncomments. - addedCLI: SQL Server indexes keep their uniqueness, clustering, descending parts,
INCLUDEcolumns and filter.databee init --dialect mssqlstarts a project, anddatabee generate ddlwrites T-SQL that, run in an empty database and pulled again, gives the same model. - addedCLI: pulling SQL Server reports views, routines, triggers, sequences, synonyms, partitioning, columnstore and temporal tables, roles and grants as
DB-INT-001;hierarchyid,sql_variant,xml, spatial types androwversionstay native types. - addedCLI:
databee exportreads SQL Server in oneSNAPSHOT(elseREPEATABLE READ) transaction and writescsv,ndjsonandsql-insertas T-SQL; subsets, samples and masks work as with the other databases. - addedCLI:
scripts/db-matrix.shalso runs the integration tests against SQL Server 2022 (mssql:2022, aliasmssql). - addedCLI:
databee transform --to postgresanddatabee analyze compatibility --to postgrestake a SQL Server model as the source. Types, identity with start and step, computed columns, filtered indexes withINCLUDE, binary collations and the T-SQL of checks, defaults and filters are converted per class; open choices are the decisionstinyint_range,money,rowversion,computed_column,target_type,spatialandcase_insensitive_unique(report codesDB-TRF-034toDB-TRF-039). - addedCLI: the compatibility report lists what SQL Server has and PostgreSQL does not receive: procedures, functions, triggers, views, sequences, synonyms, partitioned and temporal tables, columnstore indexes, roles and grants as
unsupportedentries (DB-TRF-021) at the object,hierarchyidandsql_variantcolumns as open decisions.databee pullkeeps these objects inproject.tomlunderextensions.mssqlfor that. - addedCLI:
databee analyze fitscores SQL Server as a fifth target next to PostgreSQL, MySQL, SQLite and MongoDB, and a SQL Server model as the model to score; SQL Server is not a target ofdatabee transformand says so. - addedCLI:
databee migratecopies a SQL Server database into PostgreSQL with the same plan, approval, resume and verify as for MySQL:datetimeoffsetvalues are compared as instants, fractions beyond microseconds are cut by a value rule, arowversioncan become a number.scripts/db-matrix.sh mssqlpassesDATABEE_TEST_CROSS_PG_URLto the SQL Server run. - addedMCP:
schema_transform,schema_analyzeand the migration tools accept a SQL Server project or database as the source. - addedProject format: a PostgreSQL identity column can carry
identity_startandidentity_increment; the DDL writesSTART WITHandINCREMENT BY. - changedStudio: toolbar and side panel fit narrow windows: the project path shrinks instead of hiding the finding counters, and the side panel width follows the window.
- changedBuild: the minimum supported Rust version is 1.95 (the SQL Server driver needs it).
- fixedStudio:
cargo tauri buildandcargo tauri devnow work fromstudio/as well asstudio/src-tauri. - fixedCLI: ALTER plans drop unnamed primary and unique keys of long table or column names by the name PostgreSQL actually gave them.
- fixedCLI:
databee exportof a PostgreSQL table sorts rows by the key column itself, no longer by its text form (id 10 came before 2). - fixedMySQL: a pulled MySQL 8 project whose checks, computed columns or expression defaults contain string literals produces DDL the server accepts again (the
information_schematext carried an extra layer of escapes). - fixedCLI: applying a lint or validation fix (
--fix) records an undo step, so the fix can be undone and earlier steps stay undoable. - fixedStudio: Apply fix records an undo step, so the fix can be undone and earlier steps stay undoable.
- fixedStudio: Undo is available after a restart and for several steps in a row, and disabled when an outside change prevents it.
- fixedStudio: lines of different foreign keys no longer share a stretch next to an entity.
- fixedStudio: a newly created entity is brought into view.
- fixedStudio: Undo shows why a step cannot be undone instead of "Nothing to undo".
- fixedStudio: enum types are shown with their namespace in the type picker when the project has several namespaces.
- fixedStudio: the macOS app bundle builds (minimum macOS 10.15).
- fixedStudio: dialogs mark their check result as out of date when the project changed on disk.