Code-based Migrations with Migratus in Clojure

Migratus is a wonderful migration tool for Clojure. You can use it on its own, or if you have a Luminus project, it is already included.

There are a few areas that could use some extra tutorials, though. One of them is code-based migrations. Especially, examples on how to modify the database would be nice.

Here’s a quick explanation of how to modify the database with a code-based migration in Migratus.

First, create an *.edn file in the folder with the regular migrations. It takes the same format as other migrations, so you can really just change the extension of one of your created migrations to ‘.edn’ and change the contents.

Continue reading “Code-based Migrations with Migratus in Clojure”