Skip to content

Commit

Permalink
Appropriate changes in order to reload the staging db
Browse files Browse the repository at this point in the history
  • Loading branch information
Antony Woods committed Dec 17, 2015
1 parent bf2565b commit e68c60c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions load-db-schema-staging.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
cat <<EOF |
(require '[witan.app.db-setup :refer [load-db-schema!]])
(require '[witan.app.config :as c])
(load-db-schema! c/config)
(exit)
EOF
lein repl :connect witan-app.marathon.mesos:5001


2 changes: 1 addition & 1 deletion load-db-schema.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
cat <<EOF |
(require '[db-setup :refer [load-db-schema!]])
(require '[witan.app.db-setup :refer [load-db-schema!]])
(require '[witan.app.config :as c])
(load-db-schema! c/config)
(exit)
Expand Down
2 changes: 1 addition & 1 deletion src/witan/app/db_setup.clj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
[config]
(let [session (session-setup (get-in config [:cassandra-session :host]))
keyspace (get-in config [:cassandra-session :keyspace])
db-scripts (clojure.string/split (slurp (io/file (io/resource "db-schema.cql"))) #";")
db-scripts (clojure.string/split (slurp (io/resource "db-schema.cql")) #";")
replication (get-in config [:cassandra-session :replication])]
(log/warn "Dropping keyspace " keyspace)
(try
Expand Down

0 comments on commit e68c60c

Please sign in to comment.