Skip to content
Browse files

be sure to load the uuid extension for postgres

  • Loading branch information...
1 parent 28cadf0 commit 0c7f154197f6f3d12cf4299ffe8e6e44fb20de19 @hiredman committed Feb 20, 2013
Showing with 6 additions and 0 deletions.
  1. +3 −0 clojurebot-facts/src/clojurebot/triples/postgres.clj
  2. +3 −0 derby-to-postgres.clj
View
3 clojurebot-facts/src/clojurebot/triples/postgres.clj
@@ -14,6 +14,9 @@
(defn create-store
[name]
(with-c (:url @pg)
+ (try
+ (sql/do-commands "CREATE EXTENSION \"uuid-ossp\"")
+ (catch Exception _))
(sql/create-table
(:table @pg)
[:id :uuid "PRIMARY KEY" "DEFAULT uuid_generate_v4()"]
View
3 derby-to-postgres.clj
@@ -30,6 +30,9 @@
(require '[clojure.java.jdbc :as jdbc])
(jdbc/with-connection postgres-db
+ (try
+ (jdbc/do-commands "CREATE EXTENSION \"uuid-ossp\"")
+ (catch Exception _))
(jdbc/create-table
postgres-table
[:id :uuid "PRIMARY KEY" "DEFAULT uuid_generate_v4()"]

0 comments on commit 0c7f154

Please sign in to comment.
Something went wrong with that request. Please try again.