37165353765dc85b3cb963946a99ad73e1efce2c
[hibernate4-maven-plugin] / src / it / tutorials / schema-osgi-unmanaged-native.sql
1
2     drop table DataPoint if exists;
3
4     drop table DataPoint_AUD if exists;
5
6     drop table REVINFO if exists;
7
8     create table DataPoint (
9         id bigint generated by default as identity,
10         name varchar(255),
11         primary key (id)
12     );
13
14     create table DataPoint_AUD (
15         id bigint not null,
16         REV integer not null,
17         REVTYPE tinyint,
18         name varchar(255),
19         primary key (id, REV)
20     );
21
22     create table REVINFO (
23         REV integer generated by default as identity,
24         REVTSTMP bigint,
25         primary key (REV)
26     );
27
28     alter table DataPoint_AUD 
29         add constraint FK_7pdslro8w1n74eqwmorrn0hnb 
30         foreign key (REV) 
31         references REVINFO;