简体   繁体   English

dbmaintain类似的工具,用于Clojure进行数据库迁移

[英]dbmaintain like tool for Clojure for database migration

Is there a dbmaintain like tool for Clojure? 是否有类似Clojure的dbmaintain工具?

I'd like to use SQL directly for DDL instead of a DSL, using a DSL for DML and queries is fine. 我想直接将SQL用于DDL而不是DSL,将DSL用于DML,并且查询很好。

I've written a very simple leiningen plugin for migrations that utilizes plain sql. 我为使用纯SQL的迁移编写了一个非常简单的leiningen插件。 It runs in the context of a clojure file, so these sql strings can still be dynamically generated. 它在clojure文件的上下文中运行,因此仍可以动态生成这些sql字符串。

Check out: https://github.com/ckuttruff/clj-sql-up 签出: 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. 也许我误会了您的问题,尽管dbmaintain似乎是用于自动化SQL数据库模式的部署和维护的工具。 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? 这听起来像dbmaintain将与用Clojure编写的程序很好地匹配,因此可以按原样使用它,除非dbmaintain具有与代码紧密集成的其他功能?

Lobos is a similar tool for Clojure. Lobos是Clojure的类似工具。 The default way to do DDL is with a Clojure DSL, so it might not fit your requirements. DDL的默认方式是使用Clojure DSL,因此它可能不符合您的要求。

As there was no dbmaintain integration for Clojure available, we wrote our own https://github.com/mysema/lein-dbmaintain 由于没有适用于Clojure的dbmaintain集成,因此我们编写了自己的https://github.com/mysema/lein-dbmaintain

lein-dbmaintain integrates dbmaintain into leiningen lein-dbmaintain将dbmaintain集成到leiningen中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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