{"action":"created","issue":{"url":"https://api.github.com/repos/weavejester/ragtime/issues/120","repository_url":"https://api.github.com/repos/weavejester/ragtime","labels_url":"https://api.github.com/repos/weavejester/ragtime/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/weavejester/ragtime/issues/120/comments","events_url":"https://api.github.com/repos/weavejester/ragtime/issues/120/events","html_url":"https://github.com/weavejester/ragtime/issues/120","id":280777190,"number":120,"title":"error trying to migrate in postgres","user":{"login":"ashton","id":95974,"avatar_url":"https://avatars2.githubusercontent.com/u/95974?v=4","gravatar_id":"","url":"https://api.github.com/users/ashton","html_url":"https://github.com/ashton","followers_url":"https://api.github.com/users/ashton/followers","following_url":"https://api.github.com/users/ashton/following{/other_user}","gists_url":"https://api.github.com/users/ashton/gists{/gist_id}","starred_url":"https://api.github.com/users/ashton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashton/subscriptions","organizations_url":"https://api.github.com/users/ashton/orgs","repos_url":"https://api.github.com/users/ashton/repos","events_url":"https://api.github.com/users/ashton/events{/privacy}","received_events_url":"https://api.github.com/users/ashton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-10T03:00:03Z","updated_at":"2017-12-10T11:00:53Z","closed_at":null,"author_association":"NONE","body":"I'm trying to make a migration in postgres, I'm following the getting started and using the integreation with leiningen:\r\n\r\n```clojure\r\n{:aliases {\"migrate\"  [\"run\" \"-m\" \"investtrack.scripts.migration/migrate\"]\r\n            \"rollback\" [\"run\" \"-m\" \"investtrack.scripts.migration/rollback\"]}}\r\n```\r\n\r\n```clojure\r\n(ns investtrack.scripts.migration\r\n  (:require [ragtime.jdbc :as jdbc]\r\n            [ragtime.repl :as repl]))\r\n\r\n(defn load-config []\r\n  {:datastore  (jdbc/sql-database \"jdbc:postgresql://postgres@localhost/investtrack\")\r\n   :migrations (jdbc/load-resources \"migrations\")})\r\n\r\n(defn migrate []\r\n  (repl/migrate (load-config)))\r\n\r\n(defn rollback []\r\n  (repl/rollback (load-config)))\r\n```\r\n\r\nRuning the command: `$ lein migrate` I get the following error:\r\n\r\nCaused by: java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to clojure.lang.Named\r\n\tat clojure.core$name.invokeStatic(core.clj:1546)\r\n\tat clojure.core$name.invoke(core.clj:1540)\r\n\tat clojure.java.jdbc$as_sql_name.invokeStatic(jdbc.clj:67)\r\n\tat clojure.java.jdbc$as_sql_name.invoke(jdbc.clj:56)\r\n\tat clojure.java.jdbc$create_table_ddl$spec_to_string__449.invoke(jdbc.clj:1052)\r\n\tat clojure.core$map$fn__4785.invoke(core.clj:2646)\r\n\tat clojure.lang.LazySeq.sval(LazySeq.java:40)\r\n\tat clojure.lang.LazySeq.seq(LazySeq.java:49)\r\n\tat clojure.lang.LazySeq.first(LazySeq.java:71)\r\n\tat clojure.lang.RT.first(RT.java:667)\r\n\tat clojure.core$first__4339.invokeStatic(core.clj:55)\r\n\tat clojure.string$join.invokeStatic(string.clj:180)\r\n\tat clojure.string$join.invoke(string.clj:180)\r\n\tat clojure.java.jdbc$create_table_ddl.invokeStatic(jdbc.clj:1056)\r\n\tat clojure.java.jdbc$create_table_ddl.doInvoke(jdbc.clj:1041)\r\n\tat clojure.lang.RestFn.invoke(RestFn.java:423)\r\n\tat ragtime.jdbc$migrations_table_ddl.invokeStatic(jdbc.clj:15)\r\n\tat ragtime.jdbc$migrations_table_ddl.invoke(jdbc.clj:14)\r\n\tat ragtime.jdbc$ensure_migrations_table_exists.invokeStatic(jdbc.clj:43)\r\n\tat ragtime.jdbc$ensure_migrations_table_exists.invoke(jdbc.clj:41)\r\n\tat ragtime.jdbc.SqlDatabase.applied_migration_ids(jdbc.clj:62)\r\n\tat ragtime.core$migrate_all.invokeStatic(core.clj:57)\r\n\tat ragtime.core$migrate_all.invoke(core.clj:33)\r\n\tat ragtime.repl$migrate.invokeStatic(repl.clj:32)\r\n\tat ragtime.repl$migrate.invoke(repl.clj:17)\r\n\tat investtrack.scripts.migration$migrate.invokeStatic(migration.clj:10)\r\n\tat investtrack.scripts.migration$migrate.invoke(migration.clj:9)\r\n\tat clojure.lang.Var.invoke(Var.java:375)\r\n\tat user$eval5.invokeStatic(form-init4999925638129078061.clj:1)\r\n\tat user$eval5.invoke(form-init4999925638129078061.clj:1)\r\n\tat clojure.lang.Compiler.eval(Compiler.java:6927)\r\n\tat clojure.lang.Compiler.eval(Compiler.java:6917)\r\n\tat clojure.lang.Compiler.load(Compiler.java:7379)"},"comment":{"url":"https://api.github.com/repos/weavejester/ragtime/issues/comments/350540217","html_url":"https://github.com/weavejester/ragtime/issues/120#issuecomment-350540217","issue_url":"https://api.github.com/repos/weavejester/ragtime/issues/120","id":350540217,"user":{"login":"weavejester","id":8780,"avatar_url":"https://avatars3.githubusercontent.com/u/8780?v=4","gravatar_id":"","url":"https://api.github.com/users/weavejester","html_url":"https://github.com/weavejester","followers_url":"https://api.github.com/users/weavejester/followers","following_url":"https://api.github.com/users/weavejester/following{/other_user}","gists_url":"https://api.github.com/users/weavejester/gists{/gist_id}","starred_url":"https://api.github.com/users/weavejester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weavejester/subscriptions","organizations_url":"https://api.github.com/users/weavejester/orgs","repos_url":"https://api.github.com/users/weavejester/repos","events_url":"https://api.github.com/users/weavejester/events{/privacy}","received_events_url":"https://api.github.com/users/weavejester/received_events","type":"User","site_admin":false},"created_at":"2017-12-10T11:00:53Z","updated_at":"2017-12-10T11:00:53Z","author_association":"OWNER","body":"Try changing your `load-config` function to:\r\n\r\n```clojure\r\n(defn load-config []\r\n  {:datastore  (jdbc/sql-database {:connection-uri \"jdbc:postgresql://postgres@localhost/investtrack\"})\r\n   :migrations (jdbc/load-resources \"migrations\")})\r\n```"}}
{"actor":{"display_login":"weavejester"}}