We are using Envers with both Oracle and MySQL without any problem. We are now trying PostgreSQL but we have the problem that the audit tables are created with a column REVTYPE of type TINYINT.
TINYINT is not supported by PostgreSQL.
Is there a way to change the type of REVTYPE?
Example:
create table AUD_SomeTable (
dbId bigint not null,
...
REV integer not null,
REVTYPE tinyint,
primary key (dbId, REV)
);
EDIT:
Problem solved: I forgot the change the Hibernate dialect.
I don’t know about about Envers, but you could create a new domain type.
You can add CONSTRAINS to check for e.g. a postive value.