A Clojure native tools library for handling migrations.
APACHE-2.0 License
Migratus runner for native Clojure projects.
Add the following to your deps.edn
:
:aliases
{:migratus {:extra-deps {orangefoxcollective/clj-migratus {:mvn/version "0.2.0"}}
:main-opts ["-m" "clj-migratus.core"]}}
Create a Migratus configuration file migratus.edn
:
{:store :database
:migration-dir "migrations"
:db {:classname "com.mysql.jdbc.Driver"
:subprotocol "mysql"
:subname "//localhost/migratus"
:user "root"
:password ""}}
You can also create a configuration file called migratus.clj
if you
want to make use of the recommended way of reading configuration from
the environment instead of hardcoding secrets in checked-in files.
Then run clj-migratus
via the command line. For example:
$ clj -Amigratus init
$ clj -Amigratus migrate
$ clj -Amigratus create create-user-table
See Migratus Usage for documentation on each command.
Copyright 2020 benjamin cassidy
Licensed under the Apache License, Version 2.0.