Spring data envers - revinfo table and entity_aud doesn't exist

892 views Asked by At

I have added envers to my Spring Boot project with @Audited, extended my JpaRepository with RevisionRepository<Entity, Id, RevisionId>, have a @EnableJpaRepositories(repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class).

I am currently using MySql for my database.

However I've come into this error

'db.revinfo' doesn't exist

also with the automatically generated tables for envers.

What am I missing in my configuration or code to fix this problem?

1

There are 1 answers

0
Rastislav S On

You need to add to application properties jpa.hibernate.ddl-auto = update so hibernate automatically generates tables for you.