Skip to content
Free and open source · MIT →

Your entities change.
Migrax writes the migration.

Database migrations generated from your JPA entities: plain SQL with a rollback script, linted for locking and data loss, and verified by your own Hibernate version before it reaches production.

Java 17+ · Spring Boot · Quarkus · Micronaut · Helidon · Jakarta EE

15Hibernate versions tested, 5.4 to 7.4
8databases, from SQLite to Oracle
5frameworks, plus Maven and Gradle plugins
0configuration files to write
1

Change an entity

Add a field, rename a column, create a table. Write Java as usual.

2

Run migrax generate

Get readable SQL and a rollback script, checked for risky statements.

3

Run migrax migrate

Apply it from the command line, in CI, or when the application starts.

See it in 30 seconds

Add a field to an entity, and Migrax writes the SQL.

Customer.java
@Entity
@Table(name = "customers")
public class Customer {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long id;

    public String email;
    public String phone;      // new
}
0002_add_customers_phone.sql
-- Generated by Migrax 0.4.0 for postgresql

ALTER TABLE customers ADD COLUMN phone varchar(255);

The migration is plain SQL you can read, review and commit, with a rollback script next to it. Nothing is hidden: you can edit every statement before it runs.

Why teams use Migrax

Everything a migration needs, checked before it reaches production.

  • Migrations written for you


    Change an entity, run migrax generate. Tables, columns, keys, indexes, join tables, element collections, sequences and inheritance come out exactly as Hibernate maps them.

  • Checked before production


    Every migration is linted for statements that lock big tables, fail on existing rows or break running instances. migrax verify has your Hibernate version validate the result.

  • Rollback included


    Each generated migration comes with a rollback script, and verify proves it works by rolling everything back and forward again.

  • Asks before it loses data


    A dropped column that looks renamed? Migrax asks, and renames it so the data stays. Drops only happen when you say --allow-destructive.

  • Catches manual changes


    migrax drift compares the live database with what your migrations produce and lists every difference, including columns someone made narrower.

  • Zero setup


    Run it in your service folder. It compiles the project, finds the dependencies and reads the database settings from your application configuration.

Works with your stack

Detected automatically. No plugin configuration needed to get started.

FrameworksSpring BootQuarkusMicronaut 4 and 5Helidon 4Jakarta EEPlain Hibernate
Hibernate5.4 to 7.4, each version reading its own mapping
DatabasesPostgreSQLCockroachDBMySQL 8MariaDBSQL ServerOracle 12c+H2SQLite
Run it fromCommand lineMaven pluginGradle pluginApplication startup

Ready when your next entity changes

Install the command line tool in a minute, then run it in any service folder.

Install Migrax Read how it works