Skip to content

Instantly share code, notes, and snippets.

@mccraigmccraig
Created August 15, 2017 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mccraigmccraig/dbf2b2144da95079489309a3ca4c3b6d to your computer and use it in GitHub Desktop.
Save mccraigmccraig/dbf2b2144da95079489309a3ca4c3b6d to your computer and use it in GitHub Desktop.
(ns er-model.migrations-cassandra.20170704114920-managed-name
(:require [qbits.alia :as alia]
[qbits.hayt :as h]
[er-cassandra.drift.migration-helpers :refer :all]))
(def up-statements
["alter table org_users add managed_name text;"
"alter table org_user_versions add managed_name text;"])
(def down-statements
["alter table org_user_versions drop managed_name;"
"alter table org_users drop managed_name;"])
(defn up
"Migrates the database up to version 20170704114920."
[]
(println "er-model.migrations-cassandra.20170704114920-managed-name up...")
(doseq [s up-statements] (execute s)))
(defn down
"Migrates the database down from version 20170704114920."
[]
(println "er-model.migrations-cassandra.20170704114920-managed-name down...")
(doseq [s down-statements] (execute s)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment