Last active
November 24, 2021 17:32
-
-
Save hugoheden/a0a7bdb83f92cc75781bfd56d5bb90e3 to your computer and use it in GitHub Desktop.
One off Flyway command line examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Flyway command line examples | |
# | |
# Print some info about the migrations applied (or not) in the DB, relating to the migration scripts in some directory | |
flyway -X -url='jdbc:mariadb://localhost:3306/my_db?currentSchema=my_schema' \ | |
-user='my_db_user' -password='my_db_passwd' \ | |
-locations=filesystem:./src/main/resources/db/migration \ | |
info | |
# Migrate the DB using the files in the directory, but only up to version 1.2 | |
flyway -X -url='jdbc:mariadb://localhost:3306/my_db?currentSchema=my_schema' \ | |
-user='my_db_user' -password='my_db_passwd' \ | |
-locations=filesystem:./src/main/resources/db/migration \ | |
-target='1.2' migrate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment