Skip to content

mysema/lein-dbmaintain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

lein-dbmaintain

DbMaintain integration for Leiningen

Configuration

Put your SQL files under sql/incremental

Project configuration like this

:plugins [[lein-dbmaintain "0.1.1"]]

:dbmaintain {:driver "com.mysql.jdbc.Driver"
             :url "jdbc:mysql://localhost:3306/mydb"
             :user-name "myuser"
             :password "mypass"
             :schemas "mydb"
             :scripts "sql"
             :dialect "mysql"}

Make sure that the needed JDBC drivers are also on the classpath.

For more details see the DbMaintain project page http://dbmaintain.sourceforge.net/overview.html

Usage

lein clean-db

Task that removes the data of all database tables, except for the DBMAINTAIN_SCRIPTS table.

lein clear-db

Task that removes all database items like tables, views etc from the database and empties the DBMAINTAIN_SCRIPTS table.

lein disable-constraints

Task that disables or drops all foreign key and not null constraints.

lein mark-up-to-date

This operation updates the state of the database to indicate that all scripts have been executed, without actually executing them. This can be useful when you want to start using DbMaintain on an existing database, or after having fixed a problem directly on the database.

lein update-db

Task that updates the database to the latest version.

lein update-sequences

License

Copyright © 2012 Mysema

Distributed under the Eclipse Public License, the same as Clojure.

About

DbMaintain integration for Leiningen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published