forked from ozoneplatform/owf-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ddl.sql
42 lines (42 loc) · 4.54 KB
/
ddl.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
alter table DWS_EventingConnect drop constraint FKCE1D8883D6895F04;
alter table dashboard drop constraint FKC18AEA9485837584;
alter table dashboard_widget_state drop constraint FKB6440EA1EDEDBBC2;
alter table dashboard_widget_state drop constraint FKB6440EA1FDD6991A;
alter table person_widget_definition drop constraint FK6F5C17C4C12321BA;
alter table person_widget_definition drop constraint FK6F5C17C4F7CB67A3;
alter table preference drop constraint FKA8FCBCDB85837584;
alter table role_people drop constraint FK28B75E78C12321BA;
alter table role_people drop constraint FK28B75E7852388A1A;
drop table DWS_EventingConnect;
drop table dashboard;
drop table dashboard_widget_state;
drop table eventing_connections;
drop table person;
drop table person_widget_definition;
drop table preference;
drop table requestmap;
drop table role;
drop table role_people;
drop table widget_definition;
drop sequence hibernate_sequence;
create table DWS_EventingConnect (DWS_ID int8 not null, DWS_EventingConnect_ID int8, eventing_connections_idx int4);
create table dashboard (id int8 not null, version int8 not null, altered_by_admin bool not null, column_count int4 not null, dashboard_position int4 not null, guid varchar(255) not null unique, isdefault bool not null, layout varchar(9) not null, name varchar(255) not null, user_id int8 not null, primary key (id));
create table dashboard_widget_state (id int8 not null, version int8 not null, active bool not null, button_id varchar(255), button_opened bool not null, collapsed bool not null, column_pos int4 not null, dashboard_id int8 not null, height int4 not null, maximized bool not null, minimized bool not null, name varchar(255) not null, person_widget_definition_id int8 not null, pinned bool not null, region varchar(15) not null, state_position int4 not null, unique_id varchar(255) not null unique, width int4 not null, x int4 not null, y int4 not null, z_index int4 not null, primary key (id));
create table eventing_connections (id int8 not null, version int8 not null, widget_guid varchar(255) not null, primary key (id));
create table person (id int8 not null, version int8 not null, description varchar(255), email varchar(255), email_show bool not null, enabled bool not null, last_login timestamp, passwd varchar(255) not null, user_real_name varchar(255) not null, username varchar(255) not null unique, primary key (id));
create table person_widget_definition (id int8 not null, version int8 not null, person_id int8 not null, pwd_position int4 not null, visible bool not null, widget_definition_id int8 not null, primary key (id));
create table preference (id int8 not null, version int8 not null, namespace varchar(255) not null, path varchar(255) not null, user_id int8 not null, value text not null, primary key (id), unique (path, namespace, user_id));
create table requestmap (id int8 not null, version int8 not null, config_attribute varchar(255) not null, url varchar(255) not null unique, primary key (id));
create table role (id int8 not null, version int8 not null, authority varchar(255) not null unique, description varchar(255) not null, primary key (id));
create table role_people (person_id int8 not null, role_id int8 not null, primary key (role_id, person_id));
create table widget_definition (id int8 not null, version int8 not null, display_name varchar(255) not null, height int4 not null, image_url_large varchar(2083) not null, image_url_small varchar(2083) not null, widget_guid varchar(255) not null unique, widget_url varchar(2083) not null, width int4 not null, primary key (id));
alter table DWS_EventingConnect add constraint FKCE1D8883D6895F04 foreign key (DWS_EventingConnect_ID) references eventing_connections;
alter table dashboard add constraint FKC18AEA9485837584 foreign key (user_id) references person;
alter table dashboard_widget_state add constraint FKB6440EA1EDEDBBC2 foreign key (person_widget_definition_id) references person_widget_definition;
alter table dashboard_widget_state add constraint FKB6440EA1FDD6991A foreign key (dashboard_id) references dashboard;
alter table person_widget_definition add constraint FK6F5C17C4C12321BA foreign key (person_id) references person;
alter table person_widget_definition add constraint FK6F5C17C4F7CB67A3 foreign key (widget_definition_id) references widget_definition;
alter table preference add constraint FKA8FCBCDB85837584 foreign key (user_id) references person;
alter table role_people add constraint FK28B75E78C12321BA foreign key (person_id) references person;
alter table role_people add constraint FK28B75E7852388A1A foreign key (role_id) references role;
create sequence hibernate_sequence;