I have a Mysql DB, schema name "myschema". This schema has tables, where some of this tables are audit tables. This is my dependency on my java project.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-envers</artifactId>
<version>5.1.0.Final</version>
</dependency>
Now I had like to remore this audit tables on my currect DB and more them on a separate instance, with a branch new uri.
How can this be done? Any advise, thank you in advance
AFAIK Envers does not support using a separate database/
DataSource. There seem to be a couple of ways to get the data to the other database: Oracle Database Link - MySQL Equivalent?Alternatively I guess you could write a custom
DataSourcethat delegates statements to different datasources depending on the statement. Check if an auditing table is mentioned and if so send it to the audit database.