Installation¶
Migrax is a command line tool. It needs Java 17 or newer; nothing else has to be installed, and no administrator rights are needed.
1. Get Migrax¶
- Open the Download page and click Download migrax-<version>.zip.
- Extract it (on Windows: right-click the file, Extract All…). You get a folder
migrax-<version>containinginstall.ps1,install.sh,binandlib.
Download the .zip, not a .jar
The Download page also lists .jar files. Those are libraries for build tools and
frameworks (the Maven plugin, the Gradle plugin, the startup integrations); they don't
contain the command line tool or the installer. Only the ZIP does.
2. Run the installer¶
Open a terminal in the extracted folder (or the source folder) and run the installer:
In Command Prompt or PowerShell, for example with the folder extracted to D:\:
(In PowerShell, use cd D:\migrax-0.4.0.) The installer copies Migrax to
%LOCALAPPDATA%\migrax and adds its bin folder to your user PATH. After that you can
delete the extracted folder and the ZIP.
3. Check it¶
Close the terminal and open a new one, then:
migrax is not recognized?
A terminal reads PATH once, when it starts, so a window that was open while the installer
ran doesn't see the new entry: open a new terminal. Terminals inside an editor (VS Code,
IntelliJ IDEA) copy the editor's PATH from when the editor started, so close every editor
window and open it again.
To keep using the current window instead:
The D:\> prompt is Command Prompt; PS D:\> is PowerShell. Their commands differ.
In a container¶
To run migrations in Kubernetes or a CI job without installing anything, use the container
image ghcr.io/fsmutimeer/migrax (from Migrax 0.3.0); see
Containers and Kubernetes.
Which Java does Migrax use?¶
Migrax uses JAVA_HOME when it is set, otherwise the java on your PATH. To run it with a
different Java for one terminal session, set JAVA_HOME there:
Extra JVM options go in MIGRAX_JAVA_OPTS.
Updating and uninstalling¶
Run the installer of the new version again to update. To uninstall, delete the install folder
(%LOCALAPPDATA%\migrax on Windows, ~/.local/share/migrax and the ~/.local/bin/migrax link
on macOS and Linux) and remove its bin folder from your user PATH.
Next: Quick start.