X-Git-Url: http://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=blobdiff_plain;f=src%2Fit%2Ftutorials%2Fschema-envers.sql;fp=src%2Fit%2Ftutorials%2Fschema-envers.sql;h=44643fa8dc09f43ffc2be62311b187f0a3f5de94;hp=0000000000000000000000000000000000000000;hb=94e6b2e93fe107e75c9d20aa1eb3126e78a5ed0a;hpb=b3f8db2fdd9eddbaac002f94068dd1b4e6aef9a8 diff --git a/src/it/tutorials/schema-envers.sql b/src/it/tutorials/schema-envers.sql new file mode 100644 index 00000000..44643fa8 --- /dev/null +++ b/src/it/tutorials/schema-envers.sql @@ -0,0 +1,33 @@ + + drop table EVENTS if exists; + + drop table EVENTS_AUD if exists; + + drop table REVINFO if exists; + + 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 FK_3hegaqrrpmx0jj0c8qacjtira + foreign key (REV) + references REVINFO;