budu/lobos — Issue #27: Migrations do not work in 1.0.0-SNAPSHOT
Author: jsyrjala
Created: 2012-02-01 21:40:05+00:00
State: open

I am getting following exception in 1.0.0-SNAPSHOT. This doesn't happen in 0.8.0.

Note that missing file is called lobos/migrations.clj, there is lobos/migration.clj file inside lobos.jar.

Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate lobos/migrations__init.class or lobos/migrations.clj on classpath:

My test program is like this:

(ns db.lobostest
(:refer-clojure :exclude [alter drop
bigint boolean char double float time complement])
(:use (lobos [migration :only [defmigration]] connectivity core schema))
)

(def database-config
{:classname "org.postgresql.Driver"
:subprotocol "postgresql"
:user "xxx"
:password "xxx"
:subname "//localhost/xxx"})

(defmigration add-new-table
(up [] (create
(table :foobar
(timestamp :stamp)
)))
(down [] (drop (table :foobar))))

(defn -main []
(open-global database-config)
(println "Migration start")
(migrate)
(println "Migration end")
)