Installation

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 Migration requires Java version 8 or later.

Additional optional installation steps are listed after the platform specific instructions.

Windows 2000/XP

  • Unzip the distribution archive, i.e. mybatis-${project.version}-migrations.zip to the directory you wish to install MyBatis Migrations. These instructions assume you chose C:\Program Files\mybatis . The subdirectory mybatis-migrations-${project.version} will be created from the archive.
  • Add the MIGRATIONS_HOME environment variable by opening up the system properties (WinKey + Pause), selecting the Advanced tab, and the Environment Variables button, then adding the MIGRATIONS_HOME variable in the user variables with the value C:\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 MIGRATIONS environment 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.

Unix-based Operating Systems (Linux, Solaris and Mac OS X)

  • Extract the distribution archive, i.e. mybatis-${project.version}-migrations.zip to the directory you wish to install MyBatis Migrations. These instructions assume you chose /usr/local/mybatis/mybatis-migrations-${project.version} . The subdirectory mybatis-migrations-${project.version} will be created from the archive.
  • In a command terminal, add the MIGRATIONS_HOME environment variable, e.g. export MIGRATIONS_HOME=/usr/local/mybatis/mybatis-migrations-${project.version}.
  • Add the MIGRATIONS environment variable, e.g. export MIGRATIONS=$MIGRATIONS_HOME/bin.
  • Add MIGRATIONS environment variable to your path, e.g. export PATH=$MIGRATIONS:$PATH.

What's Included?

The MyBatis Migrations package is small and simple. The following is the contents of the unzipped package:

  • ./lib/mybatis-${project.version}.jar
  • ./bin/migrate
  • ./bin/migrate.cmd
  • LICENSE
  • NOTICE
  • MIGRATIONS-README

The single MyBatis JAR file is the only dependency that MyBatis Migrations has. script files do the same thing, but as you can see, one is for *nix shells and the other is for Windows (Note: cygwin users should still call the .cmd version).