7 |
|
-- ====================================================================== |
8 |
|
create table t_collection_type |
9 |
|
(id integer not null, |
10 |
< |
name varchar (1000) not null, |
11 |
< |
created_at float not null, |
12 |
< |
created_by integer not null, |
13 |
< |
modified_at float, |
14 |
< |
modified_by integer); |
10 |
> |
name varchar (1000) not null); |
11 |
|
|
12 |
|
create table t_app_family |
13 |
|
(id integer not null, |
14 |
< |
name varchar (1000) not null, |
19 |
< |
created_at float not null, |
20 |
< |
created_by integer not null, |
21 |
< |
modified_at float, |
22 |
< |
modified_by integer); |
14 |
> |
name varchar (1000) not null); |
15 |
|
|
16 |
|
create table t_application |
17 |
|
(id integer not null, |
18 |
|
executable varchar (1000) not null, |
19 |
|
app_version varchar (1000) not null, |
20 |
|
app_family integer not null, |
21 |
< |
input_type integer not null, |
22 |
< |
output_type integer not null, |
31 |
< |
created_at float not null, |
32 |
< |
created_by integer not null, |
33 |
< |
modified_at float, |
34 |
< |
modified_by integer); |
21 |
> |
input_type integer /* not null */, |
22 |
> |
output_type integer /* not null */); |
23 |
|
|
24 |
|
create table t_app_config |
25 |
|
(id integer not null, |
26 |
|
application integer not null, |
27 |
|
parameter_set varchar (1000) not null, -- FIXME! |
28 |
< |
conditions_version varchar (1000) not null, |
41 |
< |
created_at float not null, |
42 |
< |
created_by integer not null, |
43 |
< |
modified_at float, |
44 |
< |
modified_by integer); |
28 |
> |
conditions_version varchar (1000) /* not null */); |
29 |
|
|
30 |
|
-- ====================================================================== |
31 |
|
alter table t_collection_type |
37 |
|
add constraint uq_collection_type_name |
38 |
|
unique (name); |
39 |
|
|
56 |
– |
alter table t_collection_type |
57 |
– |
add constraint fk_collection_type_creatby |
58 |
– |
foreign key (created_by) references t_person (id); |
59 |
– |
|
60 |
– |
alter table t_collection_type |
61 |
– |
add constraint fk_collection_type_modifby |
62 |
– |
foreign key (modified_by) references t_person (id); |
63 |
– |
|
40 |
|
-- |
41 |
|
alter table t_app_family |
42 |
|
add constraint pk_app_family |
47 |
|
add constraint uq_app_family_name |
48 |
|
unique (name); |
49 |
|
|
74 |
– |
alter table t_app_family |
75 |
– |
add constraint fk_app_family_creatby |
76 |
– |
foreign key (created_by) references t_person (id); |
77 |
– |
|
78 |
– |
alter table t_app_family |
79 |
– |
add constraint fk_app_family_modifby |
80 |
– |
foreign key (modified_by) references t_person (id); |
81 |
– |
|
50 |
|
-- |
51 |
|
alter table t_application |
52 |
|
add constraint pk_application |
69 |
|
add constraint fk_application_outtype |
70 |
|
foreign key (output_type) references t_collection_type (id); |
71 |
|
|
104 |
– |
alter table t_application |
105 |
– |
add constraint fk_application_creatby |
106 |
– |
foreign key (created_by) references t_person (id); |
107 |
– |
|
108 |
– |
alter table t_application |
109 |
– |
add constraint fk_application_modifby |
110 |
– |
foreign key (modified_by) references t_person (id); |
111 |
– |
|
72 |
|
-- |
73 |
|
alter table t_app_config |
74 |
|
add constraint pk_app_config |
83 |
|
add constraint fk_app_config_app |
84 |
|
foreign key (application) references t_application (id); |
85 |
|
|
126 |
– |
alter table t_app_config |
127 |
– |
add constraint fk_app_config_creatby |
128 |
– |
foreign key (created_by) references t_person (id); |
129 |
– |
|
130 |
– |
alter table t_app_config |
131 |
– |
add constraint fk_app_config_modifby |
132 |
– |
foreign key (modified_by) references t_person (id); |
133 |
– |
|
86 |
|
-- ====================================================================== |
135 |
– |
create index ix_collection_type_creatby |
136 |
– |
on t_collection_type (created_by) |
137 |
– |
tablespace CMS_DBS_INDX01; |
138 |
– |
|
139 |
– |
create index ix_collection_type_modifby |
140 |
– |
on t_collection_type (modified_by) |
141 |
– |
tablespace CMS_DBS_INDX01; |
142 |
– |
|
143 |
– |
-- |
144 |
– |
create index ix_app_family_creatby |
145 |
– |
on t_app_family (created_by) |
146 |
– |
tablespace CMS_DBS_INDX01; |
147 |
– |
|
148 |
– |
create index ix_app_family_modifby |
149 |
– |
on t_app_family (modified_by) |
150 |
– |
tablespace CMS_DBS_INDX01; |
151 |
– |
|
152 |
– |
-- |
87 |
|
create index ix_application_intype |
88 |
|
on t_application (input_type) |
89 |
|
tablespace CMS_DBS_INDX01; |
91 |
|
create index ix_application_outtype |
92 |
|
on t_application (output_type) |
93 |
|
tablespace CMS_DBS_INDX01; |
160 |
– |
|
161 |
– |
create index ix_application_creatby |
162 |
– |
on t_application (created_by) |
163 |
– |
tablespace CMS_DBS_INDX01; |
164 |
– |
|
165 |
– |
create index ix_application_modifby |
166 |
– |
on t_application (modified_by) |
167 |
– |
tablespace CMS_DBS_INDX01; |
168 |
– |
|
169 |
– |
-- |
170 |
– |
create index ix_app_config_creatby |
171 |
– |
on t_app_config (created_by) |
172 |
– |
tablespace CMS_DBS_INDX01; |
173 |
– |
|
174 |
– |
create index ix_app_config_modifby |
175 |
– |
on t_app_config (modified_by) |
176 |
– |
tablespace CMS_DBS_INDX01; |