Added script to check outcome of the hibernate-tutorials
[hibernate4-maven-plugin] / src / it / tutorials / schema-osgi-unmanaged-native.sql
diff --git a/src/it/tutorials/schema-osgi-unmanaged-native.sql b/src/it/tutorials/schema-osgi-unmanaged-native.sql
new file mode 100644 (file)
index 0000000..3716535
--- /dev/null
@@ -0,0 +1,31 @@
+
+    drop table DataPoint if exists;
+
+    drop table DataPoint_AUD if exists;
+
+    drop table REVINFO if exists;
+
+    create table DataPoint (
+        id bigint generated by default as identity,
+        name varchar(255),
+        primary key (id)
+    );
+
+    create table DataPoint_AUD (
+        id bigint not null,
+        REV integer not null,
+        REVTYPE tinyint,
+        name varchar(255),
+        primary key (id, REV)
+    );
+
+    create table REVINFO (
+        REV integer generated by default as identity,
+        REVTSTMP bigint,
+        primary key (REV)
+    );
+
+    alter table DataPoint_AUD 
+        add constraint FK_7pdslro8w1n74eqwmorrn0hnb 
+        foreign key (REV) 
+        references REVINFO;