Skip to content

Commit

Permalink
Merge pull request #110 from MastodonC/fix/db-control-for-staging
Browse files Browse the repository at this point in the history
Appropriate changes in order to reload the staging db
  • Loading branch information
acron0 committed Dec 17, 2015
2 parents bf2565b + e68c60c commit 795fc9e
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 795fc9e

Please sign in to comment.