X-Git-Url: https://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=fbab57c262b381d3db470cfd240fbcf9714401cb;hpb=5a4b1c4ba0a8285eaf0ce91fe89e7d20a31fc9a1 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;