Added tutorials of the hibernate-release 5.2.18.Final
[hibernate4-maven-plugin] / src / it / tutorials-4.3.9 / schema-envers.sql
diff --git a/src/it/tutorials-4.3.9/schema-envers.sql b/src/it/tutorials-4.3.9/schema-envers.sql
new file mode 100644 (file)
index 0000000..ecec80e
--- /dev/null
@@ -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;