luminus

2020-01-30T19:17:45.040600Z

Hello. I have a luminus app with a postgres db, and I'm using the default database migrations library. This works great on my development machine (where I run the migrations with lein and start the web server via the repl). However, I am deploying this app to a wildfly instance (using lein immutant war), and I am at a loss as to how to run the migrations in production. I have ssh access to the machine running wildfly, and I can run jboss-cli, but I don't know what command to execute to run the migrations. The documentation at https://luminusweb.com/docs/deployment.html has a suggestion for Heroku to make 'run the migrations' part of app start-up, so I tried that. I can see from the logs that my app did indeed run a 'migrate' step, but it did not find any migrations to run! (I checked that the files under resources/migrations/ are indeed included in my .war file). Any help is appreciated!

2020-01-31T20:38:50.043500Z

thanks for the info, that might be just what I need. I just need to figure out where on the server the .war is stored 😃

2020-01-31T20:39:30.043700Z

I have noticed the schema_migrations table too... it's another way I know that none of my migrations have run in production

👍 1
bibiki 2020-01-30T23:19:13.040700Z

have you tried this?

java -jar target/uberjar/<app>.jar migrate

bibiki 2020-01-30T23:49:20.040900Z

another thing I just found out is that migrations creates a schema_migrations table in the database where it keeps track of migrations ran. for all I currently understand, for a migration file to be ran, its name must start with at least 1 digit AND that file name must not have been entered in the schema_migrations file. Hope this helps