I am using Play 2.0 framework
and Datomic
for persistence. As of now, we usually install the database (and run migrations ) manually i.e. by reading schema from *.edn
files from groovy script.
Now, I want to move my migration to 'Evolution', what could be the best possible way to do it? So all I want to know is:
I'm afraid it won't be possible to use evolutions through Datomic
, they're meant to be used with JDBC/SQL (as evidenced by the source). That being said, It's possible in theory to achieve this if you were using an SQL database as the storage service for datomic (but from your question i gather that you're not).
A solution/alternative could be to call your Groovy script (or do it in Java) from within Play's onStart
method which can be overriden in Global.java (example here). Of course, you would have to do the checks to validate that the schema is up-to-date your self.