fe6130e0fe4dad1d09a043af7d27304e010338db
[hibernate4-maven-plugin] / src / it / hibernate4-maven-plugin-envers-sample / create-tables-hsqldb.sql
1
2     create table TTL_AUDIT_REVISION (
3         ID bigint not null,
4         EVENT_DATE timestamp,
5         ENVERS_TSTAMP bigint not null,
6         USER_NAME varchar(80) not null,
7         primary key (ID)
8     );
9
10     create table TTL_EVENT (
11         ID bigint not null,
12         EVENT_DATE timestamp not null,
13         TITLE varchar(80) not null,
14         primary key (ID)
15     );
16
17     create table TTL_EVENT_AUD (
18         ID bigint not null,
19         REV bigint not null,
20         REVTYPE tinyint,
21         EVENT_DATE timestamp,
22         TITLE varchar(80),
23         primary key (ID, REV)
24     );
25
26     alter table TTL_EVENT_AUD 
27         add constraint FK_cjsh8995uabmdm9b30uvmyj6p 
28         foreign key (REV) 
29         references TTL_AUDIT_REVISION;
30
31     create sequence TTL_AUDIT_REVISION_SEQ;
32
33     create sequence TTL_EVENT_SEQ;