简体   繁体   中英

dbmaintain like tool for Clojure for database migration

Is there a dbmaintain like tool for Clojure?

I'd like to use SQL directly for DDL instead of a DSL, using a DSL for DML and queries is fine.

I've written a very simple leiningen plugin for migrations that utilizes plain sql. It runs in the context of a clojure file, so these sql strings can still be dynamically generated.

Check out: https://github.com/ckuttruff/clj-sql-up

I started the project recently so feedback would be very welcome.

perhaps I'm misunderstanding your question, though it seems that dbmaintain is a tool for automating the deployment and maintenance of SQL database schemas. It is capable of ensuring that the database is in the correct configuration (schemas etc.) to run a particular version of a program. This sounds like dbmaintain would match well with programs written in Clojure so it should be fine to use it as is, unless dbmaintain has some other features that are more tightly intergrated with the code?

Lobos is a similar tool for Clojure. The default way to do DDL is with a Clojure DSL, so it might not fit your requirements.

As there was no dbmaintain integration for Clojure available, we wrote our own https://github.com/mysema/lein-dbmaintain

lein-dbmaintain integrates dbmaintain into leiningen

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM