X-Git-Url: http://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=blobdiff_plain;f=src%2Fit%2Ftutorials-5.0.12%2Fschema-envers.sql;fp=src%2Fit%2Ftutorials-5.0.12%2Fschema-envers.sql;h=ecec80efc160ef1ab938315d898949770bfcf47d;hp=0000000000000000000000000000000000000000;hb=d7c7a224ec7fcd450ffb9a99eecfaefcb1a38ef1;hpb=fe9c99046f93cbc5a14d7b5314dc1c5c06ae2b80 diff --git a/src/it/tutorials-5.0.12/schema-envers.sql b/src/it/tutorials-5.0.12/schema-envers.sql new file mode 100644 index 00000000..ecec80ef --- /dev/null +++ b/src/it/tutorials-5.0.12/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;