I use the migratus project to migrate the database schema using SQL scripts. For some time it took to store the serialized data in some fields of the database. I want to be able to update them (fields with serialized data) content during migration, if necessary.

Tell me, is there a library that supports, along with SQL scripts, the usual clojure code?

  • Theoretically, a solution comes to mind through Migratus itself: Make a modify-sql-fn that will execute whatever code is written in a special comment inside SQL. But it may be worth making a feature request. And I also barely recall that I saw some kind of library where I was allowed to construct SQL in pieces with a significant use of arbitrary Clojure. If I remember, I will write. - D-side
  • Interesting use of modify-sql-fn =) Thanks for the idea. - ygun
  • Found it was HugSQL . But to stretch it in migration, you will have to take something more generalized and base independent, like Ragtime . In general, besides making decisions "write for yourself" I can offer nothing, I'm afraid I can't. Ask in Clojurians chatika! There may know. - D-side
  • I already looked towards ragtime. And about HugSQL did not understand, how do you suggest using it? - ygun
  • one
    clj-sql-up seems to solve the problem directly at all :) It has not been updated for a long time. - D-side

0