[
https://issues.jboss.org/browse/WFLY-1186?page=com.atlassian.jira.plugin....
]
Scott Marlow commented on WFLY-1186:
------------------------------------
I agree, that for the Hibernate (or any persistence provider) JPA 2.1 database migration
support, the database user account used, would need permissions to execute DDL.
I think there are probably multiple ways we could handle deployment time callbacks for
database migration. One strategy might be to let an application level class be invoked
(at deployment time, before the persistence unit is created). This would be pretty much
following your original suggestion (either via extension annotation or a persistence unit
property).
The callback could probably use the JPA 2.1 database migration api or something custom
like FlyWayDB (perhaps even using
http://schemacrawler.sourceforge.net) that verify the
schema.
Create JPA service callback for invoking database migration
-----------------------------------------------------------
Key: WFLY-1186
URL:
https://issues.jboss.org/browse/WFLY-1186
Project: WildFly
Issue Type: Feature Request
Components: JPA / Hibernate
Reporter: Anil Arora
Assignee: Scott Marlow
Looking for a simple callback/listener mechanism so that we can invoke a database
migration script before JPA persistent unit starts up and runs the Hibernate schema
validation mechanism.
Ideally, there would be a property within the persistence.xml that indicates which class
to call. It would also pass in/inject the datasource that is being used for the
persistence unit.
Essentially, this would solve the lack of migration support in Hibernate itself.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira