Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up and using flyway on mac

Tags:

macos

flyway

How exactly do you use flyway on Mac, because i'm having trouble! I've installed home brew, download flyway, and unzipped it. I have also set up the flyway.conf to use my DB url, username, and password but it only works within the conf folder. I get this error when i run "flyway info" in the terminal outside of the conf folder. "ERROR: Unable to connect to the database. Configure the url, user and password!" I have tried everything on the website. Thank!

like image 577
Bitcode23 Avatar asked Apr 14 '16 11:04

Bitcode23


1 Answers

I have gotten this working by using homebrew to install flyway:

brew install flyway

Then, from within the project directory I ran the following command. The sub-directory which contained my SQL scripts was ./db/migrations/

flyway -url="jdbc:postgresql://127.0.0.1/databasename" -user="username" -password="password" -locations="filesystem:db/migrations/" migrate

This worked for me and was relatively easy, the only thing to note was that the homebrew version of flyway was a bit behind the github / download version on their site.

like image 71
Dominik Avatar answered Oct 07 '22 14:10

Dominik