ato/clojars-web — pull request #56 by cldwalker (2012-07-13 15:48:52+00:00)
Title: ensure data/ directory exists when running migrations

Following the dev setup instructions currently results in this:

```sh
$ lein run -m clojars.db.migrate
All namespaces already :aot compiled.
Exception in thread "main" java.sql.SQLException: path to 'data/dev_db': '/Users/me/code/fork/clojars-web/data' does not exist
at org.sqlite.Conn.(Conn.java:104)
at org.sqlite.Conn.(Conn.java:49)
at org.sqlite.JDBC.connect(JDBC.java:86)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at clojure.java.jdbc.internal$get_connection.invoke(internal.clj:168)
at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:186)
at clojars.db.migrate$migrate.doInvoke(migrate.clj:26)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojars.db.migrate$_main.invoke(migrate.clj:40)
at clojure.lang.Var.invoke(Var.java:411)
at user$eval64.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6501)
at clojure.lang.Compiler.eval(Compiler.java:6477)
at clojure.core$eval.invoke(core.clj:2797)
at clojure.main$eval_opt.invoke(main.clj:297)
at clojure.main$initialize.invoke(main.clj:316)
at clojure.main$null_opt.invoke(main.clj:349)
at clojure.main$main.doInvoke(main.clj:427)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
```

I updated migrate.clj so it works as intended. Alternatively, we could just add `mkdir data` to the instructions.