Fork me on GitHub
#luminus
<
2023-01-17
>
Asher Serling08:01:11

Hi everyone. I'm using HoneySQL in my Luminus project, and I'd like to use it for migrations as well. I'm trying to use the Drift library to accomplish this. I deploy my project to AWS BeanStalk as a .jar file, so I'm looking for a way around using the 'lein migrate' command to actually run the migrations. Is there a way to run the migrations from within the project? Is there a different solution I should be thinking about?

javahippie08:01:23

Depending on the flags you added while generating your Luminus template, you should have the function luminus-migrations.core/migrate you can call from within the code. In my case, there is even a wrapper in the user namespace, a function called migrate, which calls it with the configured DB connection

Asher Serling09:01:12

according to the github that library is a wrapper around migratus. i'm using drift

javahippie09:01:28

Ah sorry, I misread that

javahippie09:01:00

I have no experience with it, but the Leiningen plugin seems to call the library directly: https://github.com/macourtney/drift/blob/b5cf735ab41ff2c95b0b1d9cf990faa342353171/src/leiningen/migrate.clj#L11

Asher Serling09:01:48

thanks man, that seems to have worked

👍 2