Skip to content

Commit

Permalink
migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaCrotti committed Mar 30, 2020
1 parent e719ac2 commit a46f662
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
keys:
- clj-deps-{{ checksum "project.clj" }}

- run: lein migratus migrate
- run: bin/migrate
- run: bin/kaocha --plugin kaocha.plugin/junit-xml --junit-xml-file test-results/kaocha/results.xml
- store_test_results:
path: test-results
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
keys:
- clj-deps-{{ checksum "project.clj" }}

- run: lein migratus migrate
- run: bin/migrate
- run: bin/kaocha --plugin cloverage --codecov

- store_artifacts:
Expand Down
3 changes: 3 additions & 0 deletions bin/migrate
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

clojure -m byf.migrate
14 changes: 14 additions & 0 deletions src/clj/byf/migrate.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(ns byf.migrate
(:gen-class)
(:require [migratus.core :as migratus]
[byf.config :refer [value]]))

(defn config
[]
{:store :database
:migration-dir "migrations"
:db (value :database-url)})

(defn -main
[& args]
(migratus/migrate (config)))

0 comments on commit a46f662

Please sign in to comment.