title: Migratus: java.lang.Character cannot be cast to clojure.lang.Named
body: <h2>Edit 2</h2>
  
  <p>Yogthos pushed Migratus 0.8.14 yesterday, which looks to have addressed the change to the <code>jdbc</code> API. But it's not on Clojars yet. I will report back once I figure out how to build the new version and put it on my classpath.</p>
  
  <h2>Edit</h2>
  
  <p>Perhaps this is related to the breaking changes in <code>clojure.java.jdbc</code> 0.6.0, which now, among other things, requires</p>
  
  <pre><code>(clojure.java.jdbc/create-table-ddl 
    :bar 
    [[:id :serial "primary key"] ; a vector rather than multiple arities
     [:name :text]])
  </code></pre>
  
  <p>rather than</p>
  
  <pre><code>(clojure.java.jdbc/create-table-ddl
    :bar
    [:id :serial "primary key"]
    [:name :text])
  </code></pre>
  
  <p>Just a thought.</p>
  
  <hr>
  
  <p>I am trying to follow along with the example at <a href="https://github.com/yogthos/migratus" rel="nofollow">https://github.com/yogthos/migratus</a>, but use SQLite [edit: same problem with postgresql]. The pertinent files are like so:</p>
  
  <pre><code>├── project.clj
  ├── resources
  │   └── migrations
  │       ├── 20160419231827-foo.down.sql
  │       └── 20160419231827-foo.up.sql
  ├── src
  │   └── foo
  │       ├── core.clj
  │       └── my-migrations.clj
  </code></pre>
  
  <p><code>project.clj</code> is like this:</p>
  
  <pre><code>(defproject foo "0.1.0-SNAPSHOT"
    :description "FIXME: write description"
    :url "http://example.com/FIXME"
    :license {:name "Eclipse Public License"
              :url "http://www.eclipse.org/legal/epl-v10.html"}
    :dependencies [[org.clojure/clojure "1.8.0"]
                   [migratus "0.8.13"]
                   [org.clojure/java.jdbc "0.6.0-alpha2"]
                   [org.xerial/sqlite-jdbc "3.8.11.2"]
                   [org.slf4j/slf4j-log4j12 "1.7.9"]]
    :main ^:skip-aot foo.core
    :target-path "target/%s"
    :profiles {:uberjar {:aot :all}})
  </code></pre>
  
  <p>And the <code>my-migrations.clj</code> is like this:</p>
  
  <pre><code>(ns foo.my-migrations
    (:require [migratus.core :as migratus]))
  
  (def config {:store :database
              :migration-dir "migrations/"
              :migration-table-name "foo_bar"
              :db {:classname "org.sqlite.JDBC"
                    :subprotocol "sqlite"
                    :connection-uri "jdbc:sqlite:site.db"}})
  
  (migratus/migrate config)
  </code></pre>
  
  <p>The migration files are verbatim from the documentation (with filenames updated to the current date/time). This leads to the following error:</p>
  
  <pre><code>  Show: Clojure Java REPL Tooling Duplicates All  (12 frames hidden)
  
  1. Unhandled java.lang.ClassCastException
    java.lang.Character cannot be cast to clojure.lang.Named
  
                    core.clj: 1546  clojure.core/name
                    core.clj: 1540  clojure.core/name
                    jdbc.clj:   62  clojure.java.jdbc/as-sql-name
                    jdbc.clj:   51  clojure.java.jdbc/as-sql-name
                    jdbc.clj: 1090  clojure.java.jdbc/create-table-ddl/spec-to-string
                    core.clj: 2644  clojure.core/map/fn
                LazySeq.java:   40  clojure.lang.LazySeq/sval
                LazySeq.java:   49  clojure.lang.LazySeq/seq
                LazySeq.java:   71  clojure.lang.LazySeq/first
                    RT.java:  667  clojure.lang.RT/first
                    core.clj:   55  clojure.core/first
                  string.clj:  180  clojure.string/join
                  string.clj:  180  clojure.string/join
                    jdbc.clj: 1094  clojure.java.jdbc/create-table-ddl
                    jdbc.clj: 1079  clojure.java.jdbc/create-table-ddl
                    jdbc.clj: 1084  clojure.java.jdbc/create-table-ddl
                    jdbc.clj: 1079  clojure.java.jdbc/create-table-ddl
                database.clj:  227  migratus.database/init-schema!/fn
                    jdbc.clj:  591  clojure.java.jdbc/db-transaction*
                    jdbc.clj:  563  clojure.java.jdbc/db-transaction*
                    jdbc.clj:  576  clojure.java.jdbc/db-transaction*
                    jdbc.clj:  563  clojure.java.jdbc/db-transaction*
                database.clj:  220  migratus.database/init-schema!
                database.clj:  219  migratus.database/init-schema!
                database.clj:  262  migratus.database.Database/connect
                    core.clj:   24  migratus.core/run
                    core.clj:   21  migratus.core/run
                    core.clj:   63  migratus.core/migrate
                    core.clj:   60  migratus.core/migrate
                        REPL:   11  foo.my-migrations/eval21297
                        REPL:   11  foo.my-migrations/eval21297
              Compiler.java: 6927  clojure.lang.Compiler/eval
              Compiler.java: 6890  clojure.lang.Compiler/eval
                    core.clj: 3105  clojure.core/eval
                    core.clj: 3101  clojure.core/eval
                    main.clj:  240  clojure.main/repl/read-eval-print/fn
                    main.clj:  240  clojure.main/repl/read-eval-print
                    main.clj:  258  clojure.main/repl/fn
                    main.clj:  258  clojure.main/repl
                    main.clj:  174  clojure.main/repl
                RestFn.java: 1523  clojure.lang.RestFn/invoke
      interruptible_eval.clj:   87  clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn
                    AFn.java:  152  clojure.lang.AFn/applyToHelper
                    AFn.java:  144  clojure.lang.AFn/applyTo
                    core.clj:  646  clojure.core/apply
                    core.clj: 1881  clojure.core/with-bindings*
                    core.clj: 1881  clojure.core/with-bindings*
                RestFn.java:  425  clojure.lang.RestFn/invoke
      interruptible_eval.clj:   85  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
      interruptible_eval.clj:   55  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
      interruptible_eval.clj:  222  clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
      interruptible_eval.clj:  190  clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn
                    AFn.java:   22  clojure.lang.AFn/run
    ThreadPoolExecutor.java: 1142  java.util.concurrent.ThreadPoolExecutor/runWorker
    ThreadPoolExecutor.java:  617  java.util.concurrent.ThreadPoolExecutor$Worker/run
                Thread.java:  745  java.lang.Thread/run
  </code></pre>