Changelog¶
All notable changes to Migrax are listed here. The format follows Keep a Changelog, and versions follow Semantic Versioning.
Unreleased¶
0.20.0-rc.2 - 2026-11-21¶
Release candidate for 0.20.0, for testing.
Added¶
status --checkalso checks the entities against the snapshot in the same run, andstatus --json --checkprints both results in one object: one command instead of two after each saved file.- Lint findings carry the safer SQL with the statement's own names, ready to copy, for MX001,
MX004, MX005, MX006, MX013, MX014 and MX020 (
Safe SQLin the text output,safeSqlin JSON), and thelinewhere the statement starts. migrax lint --sarif <file>writes the findings as SARIF 2.1.0, so GitHub code scanning, Azure DevOps and others show them on the SQL line in a pull request. The GitHub Action writes it too (outputsarif).- PostgreSQL lint rules MX020 (
REINDEX,DROP INDEX,REFRESH MATERIALIZED VIEWandDETACH PARTITIONwithoutCONCURRENTLY) and MX021 (VACUUM FULL,CLUSTER,SET TABLESPACE,SET LOGGED/UNLOGGED, which rewrite the table under an exclusive lock). MX008 also flags renamed views, materialized views, sequences and schemas, and MX012DETACH PARTITION ... CONCURRENTLYinside a transaction. init --jsonandreport --json.initalso says when the folder it ran in has no build file and the project folder above it was set up.generate --rebuild-snapshotmoves.migrax/snapshot.jsonback to the history snapshot of the newest generated migration before the deleted ones, after one was deleted on purpose. With no migration file left at all (a wrong--locations, say) it asks for--yesbefore it removes the snapshot.
Changed¶
generatestops with MXE119 when a generated migration file was deleted after the snapshot moved on. Before, it reported "No changes detected" and the deleted changes were never written again.rollbacksays when the migration file itself is missing, and how to remove it from the history withrepair --action forget, instead of only "No rollback script".migrax helpdescribesimportwithout naming other tools.
Security¶
- More password forms are hidden in database URLs shown in messages,
doctor,statusand reports: misspelled or percent-encoded setting names (paswd=,pasword=,%70assword=,auth=), a password where the port should be when the@hostis missing (//root:password/shop), Oracle URLs after a mistypedjdbc:, behind wrappers with-in their name, ash2:oracle:, and with the user and password quoted together. A driver that fails with a plainErrorno longer shows a URL that may hold a password. Also hidden: an Oracle URL whose later password setting holds an@, and a URL typed without//and@host(jdbc:postgresql:postgres:password/shop), also when a//comes only later in it. doctornames a skipped non-JDBCDATABASE_URLonly by a known scheme (postgres://,mysql://, ...); for any other text before://it says only that it is a URL.
Fixed¶
- Reading a table whose name has
_or%could also read the columns of a table the name matches as a pattern (a_bandaxb). verifyno longer warns that it found no entities when they are mapped inorm.xml.
0.20.0-rc.1 - 2026-11-20¶
Release candidate for 0.20.0, for testing.
Added¶
migrax.propertiesin the project folder: Migrax's own settings file (migrax.url,migrax.user,migrax.locationsand every othermigrax.*key), for projects withoutapplication.properties, such as Python, Node.js or Go services with hand-written SQL. It wins over the application's files and loses to environment variables and options. It also marks the project folder, so commands find it from a folder below, also inside a repository whose root has apom.xml. Without a database URL in such a project, the error now points tomigrax.url in migrax.propertiesinstead of a Spring setting.
Fixed¶
- A
DATABASE_URLorDB_URLthat is not a JDBC URL, as applications in other languages set it (postgres://...,sqlite:///...), made every command fail with "No JDBC driver accepts URL", even withmigrax.urlset. Migrax now skips such a value and reads the next setting;doctorand the "No database URL found" error say it was skipped. A JDBC URL in these variables works as before.
Security¶
- A password in a JDBC URL setting named
passwd,pass,pw,psw,pswd,passphraseorcredential(s)(for examplejdbc:postgresql://db/shop?passwd=...) was shown indoctor,statusand error messages; onlypassword,pwd,secret,keyandtokenwere masked. These names are masked now too, and a failed connection with such a URL hides the driver's message, as it already did for the others. If you used such a setting, consider changing the password: this output can end up in CI logs and saved reports.
0.19.0 - 2026-11-19¶
The first stable release since 0.17.1. It contains everything in the release candidates 0.17.2-rc.1 to 0.19.0-rc.4 (each in the changelog), plus the fixes in this section. The main changes since 0.17.1:
generate,checkandplanno longer wait for Maven or Gradle after an entity edit.- PostgreSQL: a migration waits at most 5 seconds for a table that another session has
locked (MXE117,
--table-lock-timeout), so queries on that table don't queue behind it. generateasks whether to keep the data it drops, so a rollback can restore it;rollbackwarns about data its scripts can't bring back.verifystarts its throwaway database in the version of yours.- New lint rule MX018 (transaction control in a migration);
importlists what still ties the project to the old tool; JSON output forstatus,generate,planandcheck. - Security: passwords stay hidden in more URLs and messages, the MCP server only reads files
of the project, and the container image has the fixed Java (CVE-2026-114938),
apt(CVE-2026-109518) and newer JDBC drivers.
Security¶
- Migrax refuses table, column and constraint names with a line break or another control
character (MXE118), whether they come from the entities, the schema file, the database
(the first
generate) or.migrax/snapshot.json. A line break in a name ended a comment line in the rollback script, and the rest of the name ran as SQL onrollback. Messages, errors,plan/check/diffreports, lint findings anddriftshow such characters as text (an escape character as\u001b) instead of sending them to the terminal. - MySQL, MariaDB and TiDB: a backslash in a table or column comment, a table-generator
sequence name or a text default of a schema file (read back through a MySQL or TiDB
database) is now written as
\\. These databases read\'as a quote inside the string, so a comment such asx\'; DROP TABLE t; --ended the string early and the rest ran as SQL, and a comment ending in\(C:\temp\) broke the migration. - On PostgreSQL, a migration with a
COMMIThidden behind anE'...'string ending in\', or after a name ending in$$(including a name with non-ASCII letters), was reported as MXE117 "Nothing was changed" when it then waited too long for a table lock, although the statements before theCOMMITwere committed. It is now recorded as failed. importno longer shows values written in Groovy slashy strings (/.../,$/.../$) or triple-quoted strings, and shows a quotedgroup:artifactonly where it is a dependency; elsewhere it saysflyway coordinateorliquibase coordinate.
0.19.0-rc.4 - 2026-11-19¶
Release candidate for 0.19.0, for testing.
Changed¶
generate --allow-destructivewithout--keep-datanow says which dropped tables and columns a rollback would bring back without their data. In a terminal it asks whether to keep that data in backup tables, and Enter keeps it; in CI, scripts and with--no-inputit prints a warning and writes the migration as before.generate --jsonlists them indataNotKept. Whengeneratestops at drops (MXE108), its hint mentions--keep-data.rollbackprints, before it runs, each change whose data its scripts can't bring back.
Security¶
- The amd64 container image runs Java 21.0.13.1, which fixes CVE-2026-114938 (a memory overflow in Java's Base64 decoder on x86-64). The arm64 image is not affected.
0.19.0-rc.3 - 2026-11-18¶
Release candidate for 0.19.0, for testing.
Added¶
lintwarns (MX018) aboutBEGIN,START TRANSACTION,COMMITorROLLBACK(andENDon PostgreSQL and SQLite) written in a migration. Migrax already runs each migration in one transaction and records it there: after aCOMMIT, a later failure can leave the first statements applied and the migration not recorded, and aROLLBACKundoes them while the migration is still recorded as applied. Blocks, procedure bodies, savepoints and migrations marked-- migrax:no-transactionare not affected.migrax import flyway|liquibasenow lists what still ties the project to the old tool: its dependencies and build plugins (Maven, Gradle, version catalog) and its settings inapplication*.properties/.yml, each with file and line, and themigrax.*key that replaces a setting where there is one. A forgotten dependency would keep the old tool migrating at startup next to Migrax. Setting values are never printed.status --jsonnames each migration'sfile, relative to the project folder, so editors and scripts open the right file when two modules have a migration with the same name.generate --jsonprints one result object: the changes (withdestructive), the possible renames with the option and value that keep the data, the files created, the contract migrations waiting in.migrax/pending/, and the columns--keep-datacan't keep. It never asks questions. When it stops at drops (MXE108), the error object still lists the changes and renames. Editors no longer have to read the text output.
Changed¶
- PostgreSQL: a migration now waits at most 5 seconds for a lock that another session holds,
instead of waiting without end while every other query on that table waits behind it. A
migration that runs in a transaction (with no
COMMITorROLLBACKof its own) and stops this way changed nothing, is not recorded as failed (error MXE117), and runs again with the nextmigrate. Change the limit with--table-lock-timeout,MIGRAX_TABLE_LOCK_TIMEOUTormigrax.table-lock-timeout;0waits without end as before. One migration can set its own withSET lock_timeoutin its file. Migrations marked-- migrax:no-transaction(such asCREATE INDEX CONCURRENTLY) keep the connection's own value.rollbackuses the same limit. migrax-junitnow depends on JUnit 5.14.4 (was 5.11.4).
Fixed¶
- A
--lock-timeoutormigrax.lock-timeouttoo large to count now stops with a clear "too long" error instead of a Java message.
Security¶
- Container image: SQLite driver 3.47.1.0 to 3.54.1.0 (its bundled SQLite versions have known vulnerabilities) and SQL Server driver 13.6.1 to 13.6.2.
0.19.0-rc.2 - 2026-11-06¶
Release candidate for 0.19.0, for testing.
Fixed¶
- Security: the container image upgrades
aptandlibapt-pkg7.0to fix CVE-2026-109518, which the base image still had.
0.19.0-rc.1 - 2026-11-05¶
Release candidate for 0.19.0, for testing.
Fixed¶
linton SQL Server and Oracle now reports MX015 (info) for aCREATE INDEXon an existing table withoutONLINE. Before, the rule never reported anything.--schemaor--schemason a database without schemas now names that database in the error and tells you to remove the option.- Oracle:
driftand the firstgenerateno longer fail with ORA-20000 when the schema has a table with a quoted mixed-case name. Reading the schema also no longer makes Oracle gather fresh table statistics. - H2, Derby, HSQLDB and Oracle: a schema named in lower case (
migrax.schema=app) finds the schema created without quotes (stored asAPP) instead of no tables. On every database, a schema name whose case differs from exactly one existing schema now finds that schema. - MySQL, MariaDB and TiDB: reading a schema by name through the Java API
(
DatabaseSchemaReader.read(connection, "other")) reads that database instead of the connection's default one. - Oracle:
clean --schemalists and drops the sequences of the named schema instead of the login user's own. - Security: the MCP tool
show_migrationonly reads files in the migration folders. Before, it printed any file the user could read, such as.envorapplication.properties, so database passwords could reach the AI client. A link to a file outside those folders is refused too.migrax sqlhas a new--migrations-onlyoption for the same limit. clean --schemaandbackups --schemause one schema name for listing and dropping. When two Oracle schemas differed only in case, they could list one and drop the tables of the other; they now stop with an error. Both also find a schema by a name that differs only in case, as the other commands do.- Security: every MCP tool refuses to run when a migration or rollback script links outside the
migration folders. Before,
verifycould show the linked file's content in a database error. --schemano longer reads_and%as wildcards:tenant_1could also list the tables oftenantx1, so a preview showed the wrong tables and a real run could stop halfway.--schemasfinds the history table of the schema it names, not of one that matches_.clean --schemaschecks every schema before it drops anything.migrate --sqlquotes a schema name that needs it, so it stays one name in the script. On PostgreSQL a mixed-case name keeps its case, as it does when Migrax runs the migration itself.- Security: a password no longer appears when the driver can't parse the URL. MySQL's error
quoted the URL's user and password, and PostgreSQL's driver logged them to the error output.
When the URL may hold a password, the driver's message is now always hidden, because a driver
can quote any piece of it. An
@in a URL setting counts, as in?user=me@server, since it can't be told from a password. Set the user and password separately from the URL to see the message. The error still gives its code and SQL state. - Security: more passwords in a URL are hidden in output. Everything after a
password=value or other secret setting is now hidden too, because a password can hold the;or&that ends a setting:jdbc:mysql://db/shop?password=x&ssl=trueshows asjdbc:mysql://db/shop?password=***. A password stays hidden when the user name has an@or/(//me@server:password@host), in an Oracle URL with no host, in a URL with a mistyped//or a/typed for the:, and behind a wrapper driver. So a URL like//db/shop?user=me@corp.comshows less than before.cleannames the database it is about to empty, since the URL may not show it. verifywarns when it found no entities, instead of only saying the schema matches them.- Security:
verify --verboseno longer prints a password in the URL through Hibernate's log (when Hibernate logs through java.util.logging, as it does in the CLI). - Security: through MCP, a schema file must be a
.sqlfile in the project. Before,migrax.schema-file=.envcould show that file's content in a database error. - A JDBC URL with an empty user name (
jdbc:mysql://:password@db), or an unquoted Oracle password containing@, no longer shows the password in output. - Values of settings ending in
tokenin a JDBC URL (for example SQL Server'saccessToken=) are hidden in output, like a password.
0.18.0-rc.2 - 2026-11-02¶
Release candidate for 0.18.0, for testing.
Changed¶
generate,check,planand the other commands that read entities no longer wait for Maven or Gradle after you edit an entity: Migrax compiles the project's Java sources itself with the JDK's compiler (in a typical Hibernate project,generateafter an edit went from about 9 seconds to about 4). The classes go to.migrax/classes; the project's owntarget/classesorbuild/classesis never written. The build tool still runs when a build file changed, a source file was deleted, the project has Kotlin sources or annotation processors such as Lombok, the code doesn't compile, the project was built outside Migrax since, or Migrax runs on a JRE without a compiler. SetMIGRAX_QUICK_COMPILE=falseto always use the build tool.
Fixed¶
--jsonoutput (and the MCP server's replies) writes characters outside ASCII as\uescapes, so an entity, table or column name likeKรผndรฉarrives intact when the output is piped on Windows. Before, Windows wrote those characters in its own code page, which is not valid UTF-8, and JSON readers such as the IntelliJ plugin got garbled names.- The
--renameand--rename-tablehints put a name in single quotes when it has characters a shell would interpret, so pasting the hint into a POSIX shell (or PowerShell) can't run part of a name as a command.
0.18.0-rc.1 - 2026-10-31¶
First release candidate for 0.18.0, for testing: it includes everything in 0.17.2-rc.3, adds
the entity class to the JSON of plan and check, and makes generate ask about the most
likely rename first. It is not on Maven Central: use the CLI from the Download page or the
container image ghcr.io/fsmutimeer/migrax:0.18.0-rc.1.
Added¶
plan --jsonandcheck --jsonname the entity class and the column of each change (entity,column), so an editor can point at the class that needs a migration.check --jsonalso lists each change as an object inoperations;changesstays as it was.entityis filled when the entities are read with Hibernate 5 or newer or by annotation scanning, and is null for the other readers for now, and for join, collection and secondary tables.
Fixed¶
- When a column disappears and several new columns of the same type appear,
generatenow asks about the most similar one first (name->full_namebeforename->country) and, after a "no", asks about the next one. Before, it asked only about the first new column in the table, and the "Possible rename" hint printed without a terminal pointed at that one too. At most three questions are asked per column, and Migrax stops asking when the input ends (Ctrl-D). - The container image is built on a newer
eclipse-temurin:21-jre, which fixes CVE-2026-111497 in the operating system's Brotli library (libbrotli1).
0.17.2-rc.3 - 2026-10-28¶
Third release candidate for 0.17.2, for testing: fixes the last two findings of the security
review of rc.2. It is not on Maven Central: use the CLI from the Download page or the container
image ghcr.io/fsmutimeer/migrax:0.17.2-rc.3.
Fixed¶
- A password with a raw
@in a//user:password@hostURL is now hidden whole, and so is the second password of a multi-host URL (//u1:p1@h1,u2:p2@h2). Before, the part after the first@showed indoctor,status, connection errors and the other places that print the URL. - Hiding the password in a very long, unusual JDBC URL no longer takes seconds (26 seconds measured for a 160 KB URL, 11 seconds for a 150 KB Oracle one; now under 30 milliseconds).
0.17.2-rc.2 - 2026-10-28¶
Second release candidate for 0.17.2, for testing: fixes from the security review of rc.1. It is
not on Maven Central: use the CLI from the Download page or the container image
ghcr.io/fsmutimeer/migrax:0.17.2-rc.2.
Changed¶
- The throwaway database that
verifyand a schema file start in Docker is now reachable only from your own machine (port published on 127.0.0.1). Before, other machines on the same network could connect to it while it ran, with its fixed password. - To pick the version of its throwaway PostgreSQL, MySQL or MariaDB database,
verifyconnects once to the database configured for the project (URL from the environment or the application's config) when you give neither--urlnor--image. It only reads the server's version, and it moves on to the version recorded in the snapshot, or the default image, when the server can't be reached. - When the configured database doesn't answer,
verifynow waits at most 10 seconds while asking it which database and version it is, instead of the driver's default (21 to 36 seconds measured on MySQL). A connect timeout in the JDBC URL is kept. Other commands still wait as long as the driver does, so a slow server is never taken for another database.
Fixed¶
- The database password was shown in plain text when the JDBC URL carried it:
cleanprinted the URL as it was, with any password in it.diff,environmentsand the MCP server'senvironmentstool (which sends it to the AI assistant), as well asdoctor,status,init, thereportHTML file,@MigraxTestand connection error messages, missed some forms: Oracle'suser/password@host(also quoted), a SQL Server password in braces that contains;, and a password containing@in a URL with a port.
These are now shown as ***, as are MySQL's password1= to password3=, SQL Server's
pwd=, keyStoreSecret= and aadSecurePrincipalSecret=, and an SQLCipher key= in a
SQLite URL. Such output often
ends up in CI logs and kept reports: if you used these URL forms, consider changing the
password.
- new and generate numbered the next migration wrongly after a migration with a number above
2147483647, such as 4294967297_x.sql: the number wrapped around, so the new file could get
a small number and run before the others, and a numbered file that long made generate stop
with an error. They now count on from any number, also from date-style ones such as
V20261027120000__x.sql. The refusal of Java migrations numbered above 1073741823 in
0.17.2-rc.1 is gone too: such a number is simply followed.
- With several databases, migrax new --java --database <name> and the CLI's Java migrations
for that database used the package db.migration of the default database. They now use
db.<name>, as the startup integrations and the documentation do. If you keep that
database's Java migrations in db.migration, set migrax.databases.<name>.java-package.
- The Java migration package (--java-package, migrax.java-package) is refused when it
contains invisible characters such as control characters, which Java allows in names but
which hide in folder names.
- verify stopped with error[MXE000]: For input string: ... when the server version recorded
in .migrax/snapshot.json was a number too large to read, for example in a hand-edited
snapshot. It now ignores that version and uses the default image.
0.17.2-rc.1 - 2026-10-27¶
Release candidate for 0.17.2, for testing: Java migration numbering, the order of column drops,
verify in the server's version and the Quarkus startup metrics. It is not on Maven Central: use
the CLI from the Download page or the container image ghcr.io/fsmutimeer/migrax:0.17.2-rc.1.
Changed¶
verifystarts its throwaway PostgreSQL, MySQL or MariaDB container in the version of your database server when Migrax can reach it, as reading a schema file already did, so the migrations are proven on the version they will run on. Before, it always used its default image (postgres:16-alpinefor PostgreSQL).--imagestill picks another one.generateanddiffnow drop columns after adding and changing the table's other columns. MySQL, MariaDB, Oracle and H2 commit each schema change at once, so when a later statement of a migration failed, for example making a new column NOT NULL while it still has empty rows, the old column and its data were already gone. Now the migration stops while they are still there. The order of the summary lines changes the same way, and so can the name of the generated file.
Fixed¶
generategave its file the number of a Java migration written withmigrax new --javawhen that number was the highest one, because it counted only SQL files. Both migrations then ran in an order nobody chose (the SQL file first). Java migrations now count, andgenerate,checkanddoctorreport a SQL file and a Java migration that share a number, with how to fix it: rename the one that is not applied yet. A project that already has such a pair failscheck(exit code 1) until then, unless both are applied in its database.migrax new --javarefuses a--java-packageormigrax.java-packagethat is not a Java package name. A value such as/tmp/xor..xmade it write the class outside the project. With a comma list of packages, the class goes into the first one.- Quarkus: the
migrax.migrations.appliedandmigrax.migrations.failedcounters and themigrax.runtimer of the migrations at startup could stay at 0 in the application's registries (Prometheus, OTLP, ...), depending on the order in which Quarkus ran its startup steps. They now always count the startup run.
0.17.1 - 2026-10-25¶
Added¶
- Every GitHub release lists the libraries it contains in
migrax-<version>-sbom.cdx.json(CycloneDX), and each of its files has a signed record of the workflow run that built it:gh attestation verify <file> -R fsmutimeer/migraxchecks it. The container image carries its own software list and build record in the registry. See Download > Check your download.
Fixed¶
- Renaming a table no longer needs
--allow-destructive. Hibernate's foreign key names contain the table name, sogenerate --rename-table(or answering "yes" to "Did you rename table ...?") dropped the old key and added it again under its new name, and the drop was counted as a destructive change. A foreign key that comes back unchanged under a new name in the same migration is no longer destructive; one that is really removed or changed still is. It is listed as "rename foreign key ..." ("kind": "rename_foreign_key"inplan --jsonanddiff --json). On PostgreSQL, CockroachDB, YugabyteDB and H2 the migration renames the key (RENAME CONSTRAINT); other databases drop it and add it again, which checks every row. - SQLite: the rollback of a table rename lost the other changes to that table (a renamed
foreign key, a changed column). SQLite makes them by rebuilding the table, and the rollback
looked the table up under the name it gives back only afterwards, so the rebuild was left
out without a word. It is now rebuilt under that name, and a table that can't be found stops
migrax generatewith an error instead. - Oracle: making a NUMBER column smaller (fewer decimals or fewer digits before the point,
biginttointegerincluded) failed with ORA-01440 once the table had rows, in a migration or in the rollback of one that made it larger. Oracle allows that only on an empty column, so the change now goes through a new column: first a check that every value fits unchanged (a value with too many digits or decimals stops the migration with a message saying how many, before the column is changed, and so does an index, constraint or column grant made by hand that dropping the column would remove), then the new column is added, a trigger keeps it up to date while the application goes on writing, the values are copied and checked once more, the old column is dropped (writes fail for a moment there) and the new one gets its name, default, NOT NULL and comment. The table is rewritten and the column moves to its end; the migration account needsCREATE TRIGGER. Columns in a key, index, unique constraint or check, and identity columns, keep the plain change, which Oracle still refuses once they have values (see Reference > Limitations).
Security¶
- Container image: newer JDBC drivers without known vulnerabilities. PostgreSQL 42.7.5 to
42.7.14 (could fall back to weaker authentication despite
channelBinding=require, and a server could make it spend CPU on SCRAM), MariaDB 3.5.1 to 3.5.11 (could send the password in clear text to a server in the middle), SQL Server 12.8.1 to 13.6.1 (did not check some input from the server well enough). URLs withencryptandtrustServerCertificatework as before (tested on SQL Server 2022). The CLI download bundles no drivers and is not affected. - Container image: the base images are pinned to exact versions, so every build of a release
ships the same thing, and
/usr/bin/pebble, a program of the base image that Migrax never runs and that scanners report, is removed. - The published POMs no longer name library versions with known vulnerabilities (Micrometer, OpenTelemetry, Spring Boot). Migrax never bundled them: your application keeps its own versions, and the framework versions Migrax works with are unchanged.
- The GitHub Action (
uses: fsmutimeer/migrax@...) runs the actions it uses at exact commits instead of version tags, so a moved or compromised tag can't change what runs in your workflow.
0.17.0 - 2026-10-22¶
Added¶
- Spring Data JDBC: projects without JPA that use Spring Data JDBC (3.0 to 4.1, Spring Boot 3.0
to 4.1) get
generate,check,verify,driftand the startup migration like JPA projects. Migrax reads Spring Data JDBC's own mapping, without a database: aggregate roots are the classes with@Tableand the types of repositories, and their child tables get the back-reference and key columns Spring Data JDBC names (@MappedCollection), with a foreign key to the parent. Found by itself when the project has no JPA entities, or chosen with--extractor spring-data-jdbc. Names written in@Tableor@Columnkeep their letter case where an unquoted name would get another one (lower case on H2, Oracle, HSQLDB and Derby, capitals on PostgreSQL), as Spring Data JDBC sends them quoted. See Reference > Entity readers. - Micronaut Data JDBC and R2DBC: projects with
@MappedEntityentities (Micronaut Data 4 and 5) getgenerate,check,verifyanddriftlike JPA projects. Migrax reads the mapping Micronaut's annotation processor compiled, without a database, and follows Micronaut Data's rules for names, join tables, embedded values and generated ids (identity, sequences, UUIDs). Found by itself when the project has no JPA entities, or chosen with--extractor micronaut-data. Micronaut 5 projects need Migrax running on Java 25; Migrax names the Java a project needs when it can't load its classes. See Reference > Entity readers. migrax environments: every environment's migrations side by side, read-only. For eachmigrax.environments.<name>.url(dev, staging, production, ...) it shows how many migrations are applied and pending, the last one applied and whether the schema drifted from the snapshot;-- migrax:envmigrations count only where they run. All databases are asked at once with--timeout, so one that doesn't answer only marks its own row. Exit code 1 when an environment can't be reached or a migration failed, changed or is missing there, 2 on drift;--jsonfor dashboards. ErrorMXE116when none is configured. See Guides > Comparing databases.- Migrations from a SQL file instead of entities: with
migrax.schema-file=db/schema.sql(--schema-file,MIGRAX_SCHEMA_FILE, ormigrax.databases.<name>.schema-file), a project without JPA entities keeps its tables as they should be in one SQL file, andgeneratewrites the migration and its rollback script from the changes, with rename questions, lint and--zero-downtimeas for entities.plan,check,verifyanddoctorread the file too. Migrax reads it by applying it to a throwaway database (in memory, Docker, or an empty one given with--scratch-url) and keeps what it read in.migrax/schema-model.json, socheckin CI needs no Docker while the file is unchanged. A statement that fails is named with its line (errorMXE115). On PostgreSQL, MySQL and MariaDB the throwaway database runs the server's own version, so a file written bypg_dump --schema-onlyormysqldump --no-dataapplies as it is. See Guides > SQL migrations for any language and Guides > Schema file from your ORM (SQLAlchemy, Drizzle, and any ORM through a dump).
Fixed¶
migrax cleandrops tables and sequences whose names keep their letter case: names with capitals on PostgreSQL, or lower-case names created in quotes on H2 and Oracle. Before, it stopped with "table does not exist".- The Spring Boot starter now works on Spring Boot 4. Spring Boot 4 moved the classes the
starter was ordered against, so it didn't run at all: no migrations at startup, and a JPA
application with
ddl-auto=validatefailed with a missing table. Themigraxhealth component works with Spring Boot 4's Actuator too. migrax-micronautnow works on Micronaut 4.0 to 4.9. Before, those versions skipped it without an error: no migrations at startup, and the application failed on a missing table. Micronaut 4.10 and 5 work as before.
0.16.0 - 2026-10-19¶
Added¶
- Drift at startup:
migrax.drift.check=warnorfailmakes the application compare the database with the schema its migrations produce when it starts, in the Spring Boot, Quarkus, Micronaut, Helidon and Jakarta EE integrations (migrax.databases.<name>.drift.checkper database).warnlogs every difference,failstops the start; the default isoff. The build puts.migrax/snapshot.jsoninto the application: the Quarkus extension (also native) and the Gradle plugin do it by themselves, Maven with the new goalmigrax:package-snapshot. See Guides > Production safety > Drift at startup.
Changed¶
historyandpendingcan't be names of further databases (migrax.databases.<name>): themigraxcommand keeps the default database's files in.migrax/history/and.migrax/pending/, next to each further database's.migrax/<name>/.migrax-integrationsandmigrax-quarkus-parentare no longer published to Maven Central: they only group modules for the build, and no published artifact refers to them.
0.15.0 - 2026-10-19¶
Added¶
- Several databases per application: a block
migrax.databases.<name>.*(data source, folders, Java package, schemas, placeholders) migrates a further database at startup, in the Spring Boot, Quarkus (also native), Micronaut, Helidon and Jakarta EE integrations. Health checks report every database. See Guides > Several databases. --database <name>on every command that works on a project (and-Dmigrax.databasefor the Maven goals,MIGRAX_DATABASE): the command works on that database, with its own connection, folders, entity package (migrax.databases.<name>.package) and snapshot in.migrax/<name>/. The default database no longer reads the entities of another database's package.
Changed¶
- Every metric has the tag
database(default, or the name of a further database), and spans the attributemigrax.database. Queries without the tag keep working. - A migration folder without a prefix (
migrax.locations=db/sql,--locations db/sql) is now a classpath folder (undersrc/main/resources) for themigraxcommand and the Maven and Gradle goals too, the same as when the application migrates at startup. Before, the command looked for it in the project folder. Writefilesystem:db/sqlfor a folder outside the resources; absolute paths are unchanged.
0.14.0 - 2026-10-18¶
Added¶
migrax.migrate-at-startup=falsein the Spring Boot, Quarkus, Micronaut, Helidon and Jakarta EE integrations: the application starts without migrating, for teams whose pipeline or DBA runs the migrations, and logs what is pending; the health check keeps reporting.- Gauge
migrax.migrations.pending(migrax_migrations_pending): how many migrations wait to run, in the same integrations when the application has Micrometer. Off withmigrax.metrics.enabled=false. See Guides > Metrics and tracing. migrax diff <source-url>: compares the schema of another database of the same kind (for example staging) with the project's database and lists the changes that would make it match;--sqlprints them as a script,--jsonfor tools, exit code 2 when they differ. Alsomvn migrax:diff. See Guides > Comparing databases.- GitLab CI and Bitbucket Pipelines templates:
check, lint of new or changed migrations, the HTML report as an artifact, and a comment on the merge or pull request (updated on each pipeline). See Guides > Continuous integration. - Published on Maven Central: the library and Maven plugin
org.migrax:migrax, the framework integrations,migrax-junitand the Gradle pluginorg.migrax, with sources, javadoc and signatures. Builds no longer need to install Migrax from the source first.
Changed¶
- Migrax is now licensed under the Apache License 2.0 (with a
NOTICEfile). Releases up to 0.13.0 keep the MIT License they were published with.
Fixed¶
generateno longer drops and re-adds a check constraint whose condition differs only in spacing or in parentheses around the whole condition (databases store conditions their own way, for example Derby).- Check conditions read from MySQL keep valid SQL quotes (MySQL reports
''as\'\'), and MySQL, MariaDB and TiDB primary keys are no longer namedPRIMARYwhen Migrax writes them back.
0.13.0 - 2026-10-16¶
Added¶
- Metrics and tracing of migrations at startup: Micrometer metrics (
migrax.run,migrax.migration,migrax.migrations.applied/failed,migrax.lock.wait) and OpenTelemetry spans (migrax migratewith amigrax migrationspan each), recorded by the Spring Boot, Quarkus, Micronaut, Helidon and Jakarta EE integrations when the application has aMeterRegistryor anOpenTelemetry. Turn them off withmigrax.metrics.enabled=falseormigrax.tracing.enabled=false.MigrationListenerbeans hear every run too, and the Java API takes listeners withlistener(...). See Guides > Metrics and tracing. - Preconditions: a
-- migrax:requireline makes a migration check the database before it runs (table-exists,table-missing,column-exists,column-missing, orsql <query>). An unmet condition stops the run (MXE114), or withelse skiprecords the migration without running it.statusandmigrate --dry-runshow the conditions of pending migrations;migrate --sqlchecks them for the first migration and stops before later ones.
0.12.0 - 2026-10-16¶
Four more databases: YugabyteDB, TiDB, HSQLDB and Apache Derby.
Added¶
- YugabyteDB (2024.2 and newer), the 9th database: dialect
yugabytedb, reached with the PostgreSQL driver (recognized from the server) or YugabyteDB's own driver. It writes PostgreSQL's SQL; the migration lock is PostgreSQL's advisory lock from 2025.1 on and a row inmigrax_lockbefore.verifystarts a throwaway YugabyteDB container, and--zero-downtimeworks as on PostgreSQL. - TiDB (7.5 and newer), the 10th database: dialect
tidb, reached with the MySQL driver and recognized from the server. It writes MySQL's SQL; check constraints needtidb_enable_check_constraint(migrax doctorwarns when it is off),--keep-databacks up withCREATE TABLE ... LIKE, and--zero-downtimecan't split renames (no triggers or writable views).verifystarts a throwaway TiDB container. - HSQLDB (HyperSQL 2.7 and newer), the 11th database: dialect
hsqldb, recognized fromjdbc:hsqldb:URLs. The migration lock is a row inmigrax_lock, so it also holds across processes for file and server databases;verifyreplays the migrations in memory. - Apache Derby (10.16 and newer), the 12th database: dialect
derby, recognized fromjdbc:derby:URLs. Type changes Derby can't make in place rebuild the column, comments are left out (Derby keeps none), andverifyreplays the migrations in memory.
0.11.0 - 2026-10-16¶
Zero-downtime changes and an HTML report.
Added¶
generate --zero-downtimesplits a change so the old and the new application version can use the database at the same time: an expand migration for this release (new columns still nullable, a renamed column copied and kept equal to the old one by a trigger, a renamed table's old name kept as a view, wider types) and a contract migration for the next release (drops, NOT NULL, narrower types, new constraints). The contract migration waits in.migrax/pending/untilgenerate --contractadds it to the migration folder. Column renames need PostgreSQL, MySQL, MariaDB or Oracle; table renames also work on SQL Server. See Guides > Zero-downtime changes.migrax report(andmvn migrax:report) writes one HTML page for reviews and CI artifacts: the schema with a diagram, entity changes without a migration, every migration with its status and lint findings, and drift. The GitHub Action uploads it as the artifactmigrax-reportand links it from its pull request comment (report: falseturns it off).
Changed¶
- Lint rules MX007 (drops) and MX008 (renames) name
generate --zero-downtimeas the fix.
0.10.0 - 2026-10-16¶
A Java API, and a JUnit 5 extension that checks migrations against the entities.
Added¶
- A Java API,
org.migrax.api.Migrax:Migrax.configure().dataSource(ds).load(), thenmigrate(),status(),rollback(steps),rollbackTo(version),validate()(do the entities match the database?) andtestRollbacks(). The startup integrations run on it. migrax-junit, a JUnit 5 extension:@MigraxTestmigrates a test database (H2, aDataSourceor a Testcontainers container) before the tests and fails them when the entities don't match the migrated schema. Withrollbacks = trueit also tests every rollback script. See Guides > Java API and JUnit tests.
0.9.0 - 2026-10-15¶
Every rollback script tested on its own, and Oracle 23ai support.
Changed¶
verifytests every rollback script on its own: it rolls the migration back, applies it again and checks that the schema is the same, and it names the script when that fails. Before, it only checked the end result, which missed a script that left something behind when an older script removed it anyway (an index on a table dropped later).
Fixed¶
- On Oracle 23ai,
booleanfields becomebooleancolumns, as Hibernate expects there, instead ofnumber(1,0). Migrax asks the database for its version and records it in the snapshot for commands that run without a connection. Older Oracle versions keepnumber(1,0). verifywithout--urlworks on Oracle: the throwaway container's port was never published, so it could not connect. It now starts Oracle Free 23ai for a 23ai project and Oracle XE 21 otherwise, with its own user instead ofsystem.verifyon Oracle no longer reports Hibernate's temporary tables (hte_...) as left behind after rolling everything back: schema validation doesn't create them anymore.- With Oracle's JDBC driver 23, a failed connection no longer prints the driver's trace (a
stack trace with the
PATHand Java settings) to the console;--verbosestill shows it.
0.8.0 - 2026-10-15¶
Hibernate 4.0 and 4.1 read through their own mapping, and installs with Homebrew and Scoop.
Added¶
- Hibernate 4.0 and 4.1 projects are read through Hibernate's own mapping, like 4.2 and newer,
and
verifyhas them validate the schema. Both versions are tested on every change. - Install with Homebrew on macOS and Linux (
brew install fsmutimeer/migrax/migrax) or with Scoop on Windows (scoop bucket add migrax https://github.com/fsmutimeer/scoop-migrax, thenscoop install migrax). Every stable release updates both.
Changed¶
- The Migrax GitHub Action uses
actions/setup-java@v6andactions/github-script@v8, which run on Node 24, so workflows that use it no longer show Node 20 deprecation warnings.
0.7.0 - 2026-10-15¶
The 0.7 release removes three more limitations: --schemas works on SQL Server, --keep-data
keeps data of tables without a primary key, and Hibernate 4.2 and 4.3 are read through their
own mapping.
Added¶
--schemasworks on SQL Server. SQL Server can't switch a connection to another schema, so Migrax names the schema instead: each schema gets its ownmigrax_history, and in a project that setsmigrax.schemas,generatewrites every table as${migrax.schema}.<table>.migrate,status,rollback,migrate --sql,cleanand the startup integrations all work per schema.${migrax.schema}: a built-in placeholder for the schema a migration runs in, on every database.- Lint rule MX017: on SQL Server with
migrax.schemas, a table without its schema in front. generate --keep-datakeeps dropped and narrowed columns of tables without a primary key. It finds the rows again by a unique key whose columns are NOT NULL, or else by all their other columns;generatewarns in that case, because rows that are the same in every other column get one value back for all of them.- Hibernate 4.2 and 4.3 are read through their own mapping, like Hibernate 5 and newer, and
verifyhas them validate the schema. Spring Boot 1'sspring.jpa.hibernate.naming-strategyis read too. Older versions are still read from their annotations.
0.6.1 - 2026-10-14¶
Fixed¶
- Oracle packages, package and type bodies, and anonymous blocks (
BEGIN ... END;,DECLARE ... BEGIN ... END;) no longer need a line with only/after them: Migrax finds where they end, as it already did for procedures, functions and triggers. - PostgreSQL and CockroachDB: a
migrate --sqlscript run with psql recordedapplied_atin the server's time zone, somigrax statuscould show it hours before the migrations Migrax applied itself. The script now records the time in the same zone as Migrax. verify: when a migration fails on the throwaway database, the error says that the migration fails on an empty database and what to check. It used to give the advice for a real database (inspect it, repair, resume), which doesn't apply there.
0.6.0 - 2026-10-14¶
The 0.6 release removes most of Migrax's limitations: EclipseLink and OpenJPA are read through
their own mapping like Hibernate (now from 5.0), Quarkus migrates before Hibernate and in native
executables, Jakarta EE servers migrate their own data sources, and --keep-data rollbacks
restore dropped data.
Added¶
- Quarkus:
migrax-quarkusis now a Quarkus extension. It applies the migrations before Hibernate starts, soquarkus.hibernate-orm.schema-management.strategy=validateworks, and it runs in native executables. The dependency stays the same; Quarkus fetches the newmigrax-quarkus-deploymentartifact itself. The readiness check is added only when the application has the health extension, so the build warning aboutHealthCheckis gone. Migrations are listed when the application is built: setmigrax.locationsbefore the build. generate --keep-datakeeps the data a migration drops, and its rollback script restores it: a dropped table is renamed to amigrax_backup_*table and renamed back, and a dropped or narrowed column is copied there with the table's primary key and filled again row by row. The newmigrax backupscommand lists the backup tables and drops them (--drop,--yes). Tested on all 8 databases.- OpenJPA: projects that use OpenJPA (Apache TomEE's JPA provider) are read through OpenJPA's
own mapping too: its names, the indexes it puts on foreign keys, identity columns, sequences
and
OPENJPA_SEQUENCE_TABLE. Tested with OpenJPA 3.2 and 4.1, and on PostgreSQL and MySQL;--extractor openjpaforces it. - EclipseLink: projects that use EclipseLink are read through EclipseLink's own mapping, as
Hibernate projects are through Hibernate's: its names, its join and collection tables, and
its id strategies, including the
SEQUENCEtable and rows a plain@GeneratedValueneeds. Before, they were read with Hibernate's rules and EclipseLink failed at runtime. Tested with EclipseLink 2.7, 3.0 and 4.0, and on PostgreSQL and MySQL.--extractor eclipselinkforces it. The database reader also recognizes H2'sBINARY LARGE OBJECTandCHARACTER LARGE OBJECTcolumns, which made the firstgeneratechange@Lobcolumns on H2. - Jakarta EE: the new
migrax-jakarta-eeintegration applies the migrations when the application starts on the server, to the data sourcepersistence.xmlnames as the server provides it (ormigrax.datasource), so the connection isn't configured twice. Tested on WildFly and Payara. Migrations and Java migrations are also found in WildFly's virtual file system. - Hibernate 5.0 to 5.3 are read through their own mapping and validate the schema in
verify, like 5.4 and newer, instead of annotation scanning. 5.0 to 5.2 need JAXB in the project on Java 11 and newer; without it Migrax falls back as before and says what is missing. The Hibernate compatibility tests now cover 19 versions. - SQL Server migrations can repeat a batch with
GO 5, as in SQL Server's own tools. migrate --sqlworks with--schemas: the script has a section per schema that switches to it first. When a Java migration is pending, the script now stops before it and says how to go on, instead of refusing to write anything.- CockroachDB: a migration that changes a column type in a way CockroachDB can't do in place (anything but widening) turns on CockroachDB's setting for it and runs outside a transaction, as CockroachDB requires. Before, such migrations failed until edited by hand.
migrax doctorwarns when the entities declare check constraints and the server is MySQL before 8.0.16, which accepts them without enforcing them.- Procedures, functions and triggers no longer need
GO,DELIMITERor/lines: Migrax ends the statement with theENDthat closes the body's firstBEGIN. Scripts with those lines work as before. New lint rule MX016 warns when a body has an unmatchedBEGINand so takes in the statements after it.
Fixed¶
- The first
generateon an existing database saw a fixed-lengthBINARY(n)column asvarbinaryand wrote a change for it, for example for thebinary(255)columns Hibernate 5 writes on H2. The database reader now keeps the column's real type. - On a database Hibernate created, an
@Checkwithout a name was added a second time by the firstgenerate, because the database had given the existing check a name of its own. Migrax now recognizes the check by its condition and keeps the database's name.
0.5.0 - 2026-10-14¶
The 0.5 release: check constraints and comments in generated migrations, stored procedures and
triggers in SQL migrations, and more control over what migrate runs and where.
Added¶
generatewrites check constraints and comments: Hibernate's@Check,@Checksand@Comment, and thecheckandcommentattributes of Jakarta Persistence 3.2's@Tableand@Column, on all 8 databases (SQLite keeps no comments). A changed condition drops the old check and adds the new one, and--safeadds checks on PostgreSQL and CockroachDB without blocking writes. The checks Hibernate 6+ derives from enum columns are generated only withmigrax.enum-checks=true. Projects that already use these annotations get them in their next generated migration; remove any that a hand-written migration added before.migrate --sql(Maven:-Dmigrax.sql=true) prints one SQL script with everythingmigratewould do, for a DBA to review and run withpsql,mysql,sqlcmdorsqlplus: the pending migrations, the history rows Migrax records, transactions where the database has them, and each tool's end markers. Nothing changes until the script runs.- Migrations for some environments only: a
-- migrax:env dev,testline makes a migration run only where--env,MIGRAX_ENVormigrax.envnames one of them. Elsewherestatusshows it as skipped ([-], stateSKIPPEDin--json), and health checks don't count it as pending. - Several migration folders:
--locations,MIGRAX_LOCATIONSandmigrax.locationstake a comma-separated list (CLI, Maven, Gradle and the startup integrations). Files run in version order across all folders; new files go into the first one. migrax baseline <migration> --yes(Maven:migrax:baseline) adopts a database whose tables already exist: it records the migrations up to the named one as applied without running them, somigrateonly runs the later ones.migrate --to <migration>(Maven:-Dmigrax.to=...) applies versioned migrations only up to and including the named one, for staged rollouts. The name can be the file name, its start, or the version number (--to 5). Repeatable migrations wait for the next migrate without--to.- Migrations can contain stored procedures, functions and triggers: a line with only
GOends a SQL Server batch,DELIMITERlines change the MySQL/MariaDB delimiter, and a line with only/ends an Oracle PL/SQL block (also usable for SQLite triggers).-- migrax:no-splitsends a whole file as one statement.migrate,rollback,lintandverifyall split this way. - Guides > Without Java entities: how to apply hand-written SQL migrations with Migrax in projects without JPA entities (Python, Node.js, other languages): drivers, connection settings, the container image and rollback scripts.
Changed¶
- The documentation moved to https://migrax.org/; the old address https://docs-migrax.github.io/ redirects there. The site has a new black, white and yellow look.
Fixed¶
migrax doctorno longer fails in projects without Java, such as the container image or a Python or Node.js project with hand-written migrations: when there is nopom.xml,build.gradleor entity package but there are migrations, it checks only the migrations and the database. Without migrations it still reports the missing build file, so a Java project opened in the wrong folder is still caught.
0.4.0 - 2026-10-11¶
The 0.4 release: Migrax moves to org.migrax. Nothing else changes in how it works; see
below for the one-line upgrade.
Changed¶
- Migrax now lives under
org.migrax(the project's domain is migrax.org): the Maven groupId, the Gradle plugin ID and the Java packages all change fromio.migraxtoorg.migrax. Commands, options, configuration keys, environment variables, migration files, the snapshot and the database tables are unchanged. The migration lock has a new name too, so a 0.3 and a 0.4 instance don't wait for each other: during the upgrade, make sure only one of them runs migrations against a database at a time.
To upgrade, replace io.migrax with org.migrax in your build:
- Maven:
<groupId>org.migrax</groupId>for the plugin and the integrations. - Gradle:
plugins { id("org.migrax") version "..." }andorg.migrax:...dependencies. - Java migrations:
import org.migrax.api.JavaMigration;. - Logging configuration: the logger is now
org.migrax.
0.3.0 - 2026-10-11¶
The 0.3 release: Migrax in containers and Kubernetes, machine-readable output, and AI assistants. It contains everything in the release candidates 0.3.0-rc.1 to 0.3.0-rc.3; the changelog lists each of their changes in detail.
Added¶
migrax mcp: a Model Context Protocol server for AI assistants (Claude Code, Codex CLI, Gemini CLI, GitHub Copilot in VS Code, Cursor, ...). Its tools only read;--allow-generatealso lets it write migration files. It never changes a database.- The documentation as plain text for AI assistants:
llms.txtandllms-full.txt. - Container image
ghcr.io/fsmutimeer/migrax(amd64 and arm64) with the common JDBC drivers, and Guides > Containers and Kubernetes with tested example manifests. --lock-timeout <time>: wait for the migration lock instead of failing, for instances that start together.- Database secrets from files (
MIGRAX_DATABASE_PASSWORD_FILE,--password-file, ...) and JDBC drivers without a project (MIGRAX_DRIVERSor the installation'sdriversfolder). --jsonon every command, with failures as JSON too, and stable error codes (MXE...) listed in Reference > Errors and JSON output.- Health checks in the Spring Boot, Quarkus, Micronaut and Helidon integrations.
Changed¶
- Error lines start with
error[<code>]:instead oferror:. - Guides > Using Migrax with AI assistants: setup for Codex CLI, Gemini CLI, GitHub Copilot in
VS Code and Cursor, how to start
migrax mcpthroughcmdon Windows for clients that can't run.cmdscripts, and why the ChatGPT app can't use a local MCP server.
0.3.0-rc.3 - 2026-10-10¶
Third release candidate for 0.3.0, for testing. It contains everything in 0.3.0-rc.2 and these changes: Migrax for AI assistants.
Added¶
migrax mcp: a Model Context Protocol server, so AI assistants such as Claude Code can call status, check, plan, lint, drift, doctor, verify and show_migration as tools. It never changes a database;--allow-generatealso lets it write migration files. Guide: Guides > Using Migrax with AI assistants, with instructions to copy into a project'sAGENTS.mdorCLAUDE.md.- The documentation as plain text for AI assistants:
llms.txtandllms-full.txton the docs site.
0.3.0-rc.2 - 2026-10-10¶
Second release candidate for 0.3.0, for testing. It contains everything in 0.3.0-rc.1 and these changes: machine-readable results and errors, and health checks.
Added¶
--jsonformigrate,rollback,repair,clean,doctor,new,squashandmerge: one result object withokandexitCodeon standard output, progress on standard error. With--json, a failure is also a JSON object.- Stable error codes (
error[MXE104]: ...), listed in Reference > Errors and JSON output. - Health checks in the startup integrations: a
migraxhealth indicator for Spring Boot Actuator and Micronaut, and a readiness check for Quarkus and Helidon; UP when every migration is applied and none failed, was edited or is missing. Each is active only when the application has the framework's health module.
Changed¶
- Error lines start with
error[<code>]:instead oferror:.
0.3.0-rc.1 - 2026-10-10¶
First release candidate for 0.3.0, for testing: running Migrax in containers and Kubernetes.
Added¶
- Container image
ghcr.io/fsmutimeer/migrax:<version>(amd64 and arm64) with Migrax and the PostgreSQL, MariaDB, SQL Server, SQLite and H2 drivers, for running migrations without a Java project. Guide: Guides > Containers and Kubernetes, with example manifests (Job, init container, Helm hook, nightly drift CronJob) tested on a local Kubernetes cluster. --lock-timeout <time>(MIGRAX_LOCK_TIMEOUT,migrax.lock-timeoutin the startup integrations): wait while another process holds the migration lock instead of failing, for instances that start together.- Database secrets from files:
MIGRAX_DATABASE_PASSWORD_FILE(and_USER_FILE,_URL_FILE) and--password-file, for Kubernetes and Docker secrets. - JDBC drivers without a project: every jar in
MIGRAX_DRIVERSor the installation'sdriversfolder is available, after the project's own dependencies.
0.2.0 - 2026-10-10¶
The 0.2 release: two more databases, a command to start a development database over, and the fixes from 0.1.1 to 0.1.4. It contains everything in the release candidates 0.2.0-rc.1 to 0.2.0-rc.6; the changelog lists each of their changes in detail.
Added¶
- CockroachDB support (
cockroachdb), through the PostgreSQL driver: Migrax recognizes the server by itself, andverifystarts a throwaway CockroachDB in Docker. - SQLite support (
sqlite, SQLite 3.35 and newer): changes SQLite can't make in place rebuild the table with its rows;verifyruns on a temporary SQLite file. migrax clean(andmvn migrax:clean) drops every table, view and sequence somigratecan rebuild a development database;MIGRAX_CLEAN_DISABLED=trueturns it off.migrax repair <migration>... --action forget --yesremoves applied migrations whose files were deleted on purpose.- The first
generateagainst a database that already has tables also writes those tables to0001_baseline.sql, so an empty database can be built from the migrations. - Documentation for
migrax import flyway|liquibase(Guides > Switching from Flyway or Liquibase), and a Download page with every release's files and SHA-256 checksums. - MIT license.
Changed¶
migrax doctorchecks locking by taking and releasing the migration lock.- Each database's support, including its migration lock, is one class found with
java.util.ServiceLoader; the CLI is one class per command. Commands and output are unchanged.
Fixed¶
- The first
generateagainst an existing database no longer finds changes that aren't real, on every supported database and with both ways of reading entities. - No JVM crash with Java 21 and Hibernate 7.3 or newer.
migrax import liquibaseincludes the entities' sequences in its baseline.
0.2.0-rc.6 - 2026-10-10¶
Sixth release candidate for 0.2.0, for testing. It contains everything in 0.2.0-rc.5 and these changes.
Added¶
- CockroachDB support (
cockroachdb), through the PostgreSQL driver: Migrax recognizes the server, writes CockroachDB's types, takes its migration lock as a row inmigrax_lock, andverifystarts a throwaway CockroachDB in Docker. Tested with the real-database suite and Hibernate's schema validation. - SQLite support (
sqlite, SQLite 3.35 and newer): changes SQLite can't make in place, such as a column's type or a new foreign key, rebuild the table with its rows, and a rebuild that breaks a foreign key fails before it commits.verifyruns on a temporary SQLite file. migrax clean(andmvn migrax:clean): drops every table, view and sequence, the migration history included, somigratecan rebuild a development database. It asks first (or needs--yes),--dry-runlists what it would drop, andMIGRAX_CLEAN_DISABLED=trueturns it off.- Documentation for
migrax import flyway|liquibase, with a guide for switching an existing project (Guides > Switching from Flyway or Liquibase).
Fixed¶
migrax import liquibaseleft the entities' sequences out of the baseline, so a database built from it failed Hibernate's validation; it now reads the database as the firstgeneratedoes.- Hibernate's mapping of a
@Lob Stringasvarchar(255)(CockroachDB) is read as text, so long values aren't cut off. - Hibernate's bulk-update helper tables (
HTE_<table>) are no longer seen as user tables.
0.2.0-rc.5 - 2026-10-10¶
Fifth release candidate for 0.2.0, for testing. It contains everything in 0.2.0-rc.4 and these fixes (also released for 0.1 as 0.1.4).
Fixed¶
- The first
generateagainst a database that already has tables wrote only the differences, so an empty database couldn't be built from the migrations andmigrax verifyfailed on the first one ("table doesn't exist"). It now also writes those tables to0001_baseline.sqland records it as applied in that database without running it; the changes follow as0002_.... Projects that already have migrations are not changed. - H2: the first
generateagainst an existing database wanted to drop the indexes H2 creates for foreign keys (named likefk_..._INDEX_8) and refused as destructive. They are now recognized as part of the foreign key, as on MySQL and MariaDB.
0.2.0-rc.4 - 2026-10-09¶
Fourth release candidate for 0.2.0, for testing. It contains everything in 0.2.0-rc.3 and these fixes (also released for 0.1 as 0.1.3).
Fixed¶
- More changes that weren't real in the first
generateagainst an existing database, found by a new test that runs it on MySQL (also with Windows-style lower-case table names), MariaDB, PostgreSQL, SQL Server and Oracle, reading entities both through Hibernate and by annotation scanning: - PostgreSQL: ids that take their value from a sequence were seen as identity columns, and the identity was dropped;
- SQL Server:
varchar(max)andvarbinary(max)columns were altered to themselves; - MySQL: UUID columns (
binary(16)) were altered to themselves; UUID columns are now kept as they are, whether stored natively or as binary; numericanddecimalare treated as the same type.
0.2.0-rc.3 - 2026-10-09¶
Third release candidate for 0.2.0, for testing. It contains everything in 0.2.0-rc.2 and these changes (also released for 0.1 as 0.1.2).
Added¶
migrax repair <migration>... --action forget --yesremoves applied migrations whose files were deleted on purpose from the history; the database keeps their changes. The "files are missing" error now shows the exact command.
Fixed¶
- The first
generateof a project, which compares the entities with the live database, no longer writes changes that aren't real: - tables whose names differ only in letter case (
categories_seqin the database,categories_SEQin the entity) on databases that fold names, such as MySQL on Windows, PostgreSQL, H2 and Oracle; this produced aCREATEand aDROPof the same table; - the index MySQL and MariaDB create for each foreign key, which was dropped;
- sequences that already exist, which were created again: real sequences, and the
next_valtables MySQL uses instead (sequences the entities don't use, such as those of identity columns, are never touched); - columns whose types the database stores the same way, such as an
Instantfield on MySQL (datetime(6)either way). migratewith an empty migration folder now reports applied migrations whose files were deleted, instead of saying there is nothing to migrate.- On Windows, every command printed the path of the old class-data archive
(
...\migrax\cache\migrax-java21.jsa) and left the file in place: Java creates it read-only. The launcher now removes it silently.
0.2.0-rc.2 - 2026-10-09¶
Second release candidate for 0.2.0, for testing. It contains everything in 0.2.0-rc.1 and this fix.
Fixed¶
- Migrax crashed (a JVM crash, not an error message) when reading Hibernate 7.3 or newer entities on Java 21. A Java 21 bug (JDK-8391430) breaks the class-data archive the launcher keeps to start faster, so the launcher now keeps it only on Java 25 and newer, and removes archives that earlier versions left behind.
0.2.0-rc.1 - 2026-10-09¶
Release candidate for 0.2.0, for testing.
Added¶
- MIT license.
- Download page on the documentation site, hosting every release's files with SHA-256 checksums, updated automatically after each release.
- Database dialects are found with
java.util.ServiceLoader(META-INF/services/io.migrax.dialect.Dialect), and each dialect brings its own migration lock, so a new database needs no change to existing code.
Changed¶
migrax doctorchecks locking by taking and releasing the migration lock, so a missing permission (for example EXECUTE on DBMS_LOCK on Oracle) shows up beforemigrate.- The CLI is split into one class per command; the commands and their output are unchanged.
CONTRIBUTING.mdexplains how to add a command or a database. - The Download page lists pre-releases in their own section, for testing.
0.1.4 - 2026-10-10¶
Fixed¶
- The first
generateagainst a database that already has tables wrote only the differences, so an empty database couldn't be built from the migrations andmigrax verifyfailed on the first one ("table doesn't exist"). It now also writes those tables to0001_baseline.sqland records it as applied in that database without running it; the changes follow as0002_.... Projects that already have migrations are not changed. - H2: the first
generateagainst an existing database wanted to drop the indexes H2 creates for foreign keys (named likefk_..._INDEX_8) and refused as destructive. They are now recognized as part of the foreign key, as on MySQL and MariaDB.
0.1.3 - 2026-10-09¶
Fixed¶
- More changes that weren't real in the first
generateagainst an existing database, found by a new test that runs it on MySQL (also with Windows-style lower-case table names), MariaDB, PostgreSQL, SQL Server and Oracle, reading entities both through Hibernate and by annotation scanning: - PostgreSQL: ids that take their value from a sequence were seen as identity columns, and the identity was dropped;
- SQL Server:
varchar(max)andvarbinary(max)columns were altered to themselves; - MySQL: UUID columns (
binary(16)) were altered to themselves; UUID columns are now kept as they are, whether stored natively or as binary; numericanddecimalare treated as the same type.
0.1.2 - 2026-10-09¶
Added¶
- MIT license.
- Download page on the documentation site, hosting every release's files with SHA-256 checksums.
migrax repair <migration>... --action forget --yesremoves applied migrations whose files were deleted on purpose from the history; the database keeps their changes. The "files are missing" error now shows the exact command.
Fixed¶
- The first
generateof a project, which compares the entities with the live database, no longer writes changes that aren't real: - tables whose names differ only in letter case (
categories_seqin the database,categories_SEQin the entity) on databases that fold names, such as MySQL on Windows, PostgreSQL, H2 and Oracle; this produced aCREATEand aDROPof the same table; - the index MySQL and MariaDB create for each foreign key, which was dropped;
- sequences that already exist, which were created again: real sequences, and the
next_valtables MySQL uses instead (sequences the entities don't use, such as those of identity columns, are never touched); - columns whose types the database stores the same way, such as an
Instantfield on MySQL (datetime(6)either way). migratewith an empty migration folder now reports applied migrations whose files were deleted, instead of saying there is nothing to migrate.- On Windows, every command printed the path of the old class-data archive
(
...\migrax\cache\migrax-java21.jsa) and left the file in place: Java creates it read-only. The launcher now removes it silently.
0.1.1 - 2026-10-09¶
Fixed¶
- The
migraxcommand crashed (a JVM crash, not an error message) when reading Hibernate 7.3 or newer entities on Java 21. A Java 21 bug (JDK-8391430) breaks the class-data archive the launcher keeps to start faster, so the launcher now keeps it only on Java 25 and newer, and removes archives that 0.1.0 left behind. The Maven plugin and the framework integrations were not affected.
0.1.0 - 2026-10-08¶
First release.
Added¶
- Generated migrations.
migrax generatecompares JPA entities with a committed snapshot and writes a numbered SQL migration with a rollback script.planpreviews it. - Hibernate's own mapping. With Hibernate 5.4 to 7.4 in the project, entities are read through that Hibernate version, so names, types, join tables, element collections, inheritance and sequences match exactly. Annotation scanning covers projects without it.
- Safe changes. Rename detection with a confirmation prompt or
--rename; drops only with--allow-destructive;generate --safefor non-blocking PostgreSQL indexes and constraints. - Runner.
migrate,status,rollback,repair; checksums of applied migrations, database locks, failure tracking, repeatable migrations, callbacks, placeholders, Java migrations and multi-tenant schemas. - Checks.
checkfor CI,lintwith 15 rules for locking and data-loss risks,verify(migrations on a throwaway database validated by your Hibernate version, with rollback round trips) anddrift(manual changes in the live database, including narrowed columns). - Team workflow.
mergefor migrations two branches numbered the same,squash, andnewfor hand-written SQL or Java migrations. - Frameworks. Configuration, naming and profile detection for Spring Boot, Quarkus, Micronaut 4 and 5 (including Micronaut Data naming), Helidon MP and SE, and Jakarta EE / plain Hibernate.
- Integrations. Startup migration for Spring Boot, Quarkus, Micronaut and Helidon; Maven and Gradle plugins; a GitHub Action that checks, lints and comments the planned SQL.
- Databases. PostgreSQL, MySQL 8, MariaDB, SQL Server, Oracle 12c+ and H2.
- Diagnostics.
doctorchecks the setup and explains risky Hibernate schema settings with the file, line and exact fix. - Command line. Installers for Windows, macOS and Linux; works from any service folder without configuration.