I've had rails like migrations working in Conjure (0.4 coming soon)
for a while. You may want to look at it for some help.

To deal with the table schema problem, I had to create flavors for
each database Conjure supports. I don't think there's much you can do
to avoid flavors when you're trying to reflect on tables in a
database.

Files of interest in Conjure:

http://github.com/macourtney/Conjure/blob/master/file_structure/default/script/migrate.clj

Everything in:
http://github.com/macourtney/Conjure/tree/master/file_structure/default/vendor/conjure/migration/

Database flavors:
http://github.com/macourtney/Conjure/tree/master/file_structure/default/db/flavors/

I hope that helps.

-Matt Courtney

On Feb 26, 10:35 am, Rick Moynihan <rick.moyni...@gmail.com> wrote:
> I've made a stab at implementing rails-like database migrations for
> use with clojure.contrib.sql.
>
> The codes currently very crude, but I'd appreciate any comments on
> style/utility:
>
> http://gist.github.com/315787
>
> Currently the hariest bit is in testing whether or not we need to
> construct the schemaversion table.  It does this via exceptions right
> now which is very ugly (especially because of nested exceptions
> etc..), but I couldn't figure out how to get derby to test for the
> presence of the table.
>
> Anyway, I'd appreciate any feedback and criticism.
>
> Also I noticed that clojure.contrib.sql doesn't have support for
> creating views.  Is this a deliberate design choice, or just an
> omission?
>
> --
> Rick 
> Moynihanhttp://twitter.com/RickMoynihanhttp://delicious.com/InkyHarmonicshttp://sourcesmouth.co.uk/

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to