- MyBatis Migrations is a Java tool, so you must have Java installed in order to proceed.
- Users need at least the Java Runtime Environment (JRE), the Java Development Kit (JDK) is a plus.
- MyBatis Migrations requires Java version 11 or later.
See the reference documentation
| Bundle Locations |
|---|
| Releases - https://repo1.maven.org/maven2/org/mybatis/mybatis-migrations/ |
| Releases – https://github.com/mybatis/migrations/releases |
- Unzip the distribution archive, i.e.
mybatis-${project.version}-migrations.zipto the directory you wish to install MyBatis Migrations. These instructions assume you choseC:\Program Files\mybatis. The subdirectorymybatis-migrations-${project.version}will be created from the archive. - Add the
MIGRATIONS_HOMEenvironment variable by opening up the system properties (WinKey + Pause), selecting the Advanced tab, and the Environment Variables button, then adding theMIGRATIONS_HOMEvariable in the user variables with the valueC:\Program Files\mybatis\mybatis-migrations-${project.version}. Be sure to omit any quotation marks around the path even if it contains spaces. - In the same dialog, add the
MIGRATIONSenvironment variable in the user variables with the value%MIGRATIONS_HOME%\bin. - In the same dialog, update/create the Path environment variable in the user variables and prepend the value
%MIGRATIONS%to add MyBatis Migrations available in the command line.
Download and extract migrations to any directory.
cd $HOME/opt
wget https://repo1.maven.org/maven2/org/mybatis/mybatis-migrations/3.5.0/mybatis-migrations-3.5.0-bundle.zip (or wget https://github.com/mybatis/migrations/releases/download/mybatis-migrations-3.5.0/mybatis-migrations-3.5.0-bundle.zip)
unzip mybatis-migrations-3.5.0-bundle.zipIn your ~/.bashrc or ~/.zshrc or equivalent add
export MIGRATIONS=$HOME/opt/mybatis-migrations-3.5.0 # replace with path you extracted to
export PATH=$MIGRATIONS/bin:$PATH
mkdir $HOME/my-migrations
cd $HOME/my-migrations
migrate initAfter that read the ./drivers and ./environments section of Migrations init
Docker users can use https://hub.docker.com/r/mybatis/migrations
Note: These are not maintained by the MyBatis team and issues should be reported to the package maintainers.
SDKMAN is a tool to manage multiple installations of JDKs and SDKs. MyBatis Migrations is available as a candidate in SDKMAN. To install using SKDMAN
sdk install mybatis
# you can list the available versions
sdk ls mybatis
# install specific version
sdk install mybatis 3.5.0Migrations is Apache Licensed
