Flyway and JPA integration

Viewed 11554

My current Spring 3.0 project is integrating with Flyway.

Thanks to the google site so there are document I can counting on. But unfortunately there is not much talking about integration with JPA.

So the questions is:

  1. How to integrate Flyway with persistence.xml? And how does it work? Each time JPA provider will auto generate schema update so how we run a script before or after then?

  2. I guess the query by flyway so far does not support HQL and such so is there any sample code then I can go through to know how to integrate the migration event? Design an interceptor or a new aspect?What to do on a domain level?

Any hint is appreciated. Thanks in advance.

1 Answers
Related