I have set my auto updating of tables to none
spring.jpa.properties.hibernate.hbm2ddl.auto=none
That way when I am running Envers I will have to create the audit tables on my own. However when I have set an entity to be audited with the @Audited annotation and I have not created an audit table for that entity I run into an error because Envers then tries to populate the audit table that does not exist. This error is crucial because it then breaks the process of updating/inserting/deleting the entity because of the audit breaking.
Is there any way to have some sort of try/catch for Envers such that if there is this sort of error it does not break the main process?
P.S.
I am also using a test database to create the audit tables automatically, but it runs at a set time or when called. I would still like some way to check for errors and in a way bypass the auditing if there is an error in case I forget to call the script or the test database updating of the tables fails.