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 8 or later.
See the reference documentation
Download and extract migrations to any directory.
cd $HOME/opt
wget https://oss.sonatype.org/content/repositories/releases/org/mybatis/mybatis-migrations/3.3.5/mybatis-migrations-3.3.5-bundle.zip
unzip mybatis-migrations-3.3.5-bundle.zip
In your ~/.bashrc or ~/.zshrc or equivalent add
export MIGRATIONS=$HOME/opt/mybatis-migrations-3.3.5 # replace with path you extracted to
export PATH=$MIGRATIONS/bin:$PATH
mkdir $HOME/my-migrations
cd $HOME/my-migrations
migrate init
After 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.3.5
Migrations is Apache Licensed