Timo Westkämper
Timo Westkämper

Reputation: 22200

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.

Upvotes: 1

Views: 435

Answers (4)

Christopher Kuttruff
Christopher Kuttruff

Reputation: 498

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.

Upvotes: 2

Timo Westkämper
Timo Westkämper

Reputation: 22200

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

Upvotes: 1

ponzao
ponzao

Reputation: 20934

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.

Upvotes: 1

Arthur Ulfeldt
Arthur Ulfeldt

Reputation: 91587

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?

Upvotes: 1

Related Questions