Unwrap exception and use sql/execute! instead of do-do-commands


1. Unwrap exception 

    Tries to replace the current exception with .getNextException in the SQL case.
    With the postgres adapater only getNextException will show something helpful. 

2. sql/execute!

    This enables to load sql-files like:

          (defn up [] [(slurp "migrations_sql/create-links.up.sql")])

    Imho sql-files are much more convenient for pure DDL statements. 
Strange, this was added later; after the pull request! Ignore the last
commit, it was not meant to
be part of the pull request.

Context: I was in need of the changes on some managed machines. So I
made this hack
to create an artifact on clojars that would  not conflict with yours.







On 10.06.14 22:29, Christopher Kuttruff wrote:
>
> In project.clj:
>
> > @@ -1,5 +1,6 @@
> > -(defproject clj-sql-up "0.3.1"
> > -  :description "A simple leiningen plugin for managing sql migrations"
> > +(defproject drtoms-clj-sql-up "0.3.2"
>
> umm... yeah, what are you doing here?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ckuttruff/clj-sql-up/pull/4/files#r13617275>.
>


Best wishes

Thomas Schank

-- 

http://drtom.schank.ch/

+ 41 76 264 76 10	

Dr. Thomas Schank
Brüggliweg 2
6300 Zug
Switzerland