X-Git-Url: https://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=blobdiff_plain;f=src%2Fit%2Ftutorials-5.2.18%2Fschema-envers.sql;fp=src%2Fit%2Ftutorials-5.2.18%2Fschema-envers.sql;h=ecec80efc160ef1ab938315d898949770bfcf47d;hp=0000000000000000000000000000000000000000;hb=d42dc8bc0d20f97e64dacd7983486fe18af0c8df;hpb=0b6b9a1bd8950880713885618d8e31c772a085ec diff --git a/src/it/tutorials-5.2.18/schema-envers.sql b/src/it/tutorials-5.2.18/schema-envers.sql new file mode 100644 index 00000000..ecec80ef --- /dev/null +++ b/src/it/tutorials-5.2.18/schema-envers.sql @@ -0,0 +1,27 @@ + + create table EVENTS ( + id bigint not null, + EVENT_DATE timestamp, + title varchar(255), + primary key (id) + ); + + create table EVENTS_AUD ( + id bigint not null, + REV integer not null, + REVTYPE tinyint, + EVENT_DATE timestamp, + title varchar(255), + primary key (id, REV) + ); + + create table REVINFO ( + REV integer generated by default as identity, + REVTSTMP bigint, + primary key (REV) + ); + + alter table EVENTS_AUD + add constraint FK5cembm6xahf542q8e4h0pq2t1 + foreign key (REV) + references REVINFO;