blob: 354011035133a454f25c97edd9066e7523059f1d [file] [log] [blame]
Benjamin, Max (mb388a)5a6a6de2018-07-30 15:56:09 -04001--------START Catalog DB SCHEMA --------
2use catalogdb;
3
4create table `allotted_resource` (
5 `model_uuid` varchar(200) not null,
6 `model_invariant_uuid` varchar(200) not null,
7 `model_version` varchar(20) not null,
8 `model_name` varchar(200) not null,
9 `tosca_node_type` varchar(200) default null,
10 `subcategory` varchar(200) default null,
11 `description` varchar(1200) default null,
12 `creation_timestamp` datetime not null default current_timestamp,
13 primary key (`model_uuid`)
14) engine=innodb default charset=latin1;
15
16
17
18
19create table `allotted_resource_customization` (
20 `model_customization_uuid` varchar(200) not null,
21 `model_instance_name` varchar(200) not null,
22 `providing_service_model_uuid` varchar(200) default null,
23 `providing_service_model_invariant_uuid` varchar(200) default null,
24 `providing_service_model_name` varchar(200) default null,
25 `target_network_role` varchar(200) default null,
26 `nf_type` varchar(200) default null,
27 `nf_role` varchar(200) default null,
28 `nf_function` varchar(200) default null,
29 `nf_naming_code` varchar(200) default null,
30 `min_instances` int(11) default null,
31 `max_instances` int(11) default null,
32 `ar_model_uuid` varchar(200) not null,
33 `creation_timestamp` datetime not null default current_timestamp,
34 primary key (`model_customization_uuid`),
35 key `fk_allotted_resource_customization__allotted_resource1_idx` (`ar_model_uuid`),
36 constraint `fk_allotted_resource_customization__allotted_resource1` foreign key (`ar_model_uuid`) references `allotted_resource` (`model_uuid`) on delete cascade on update cascade
37) engine=innodb default charset=latin1;
38
39
40
41
42create table `heat_environment` (
43 `artifact_uuid` varchar(200) not null,
44 `name` varchar(100) not null,
45 `version` varchar(20) not null,
46 `description` varchar(1200) default null,
47 `body` longtext not null,
48 `artifact_checksum` varchar(200) not null default 'manual record',
49 `creation_timestamp` datetime not null default current_timestamp,
50 primary key (`artifact_uuid`)
51) engine=innodb default charset=latin1;
52
53
54
55create table `heat_files` (
56 `artifact_uuid` varchar(200) not null,
57 `name` varchar(200) not null,
58 `version` varchar(20) not null,
59 `description` varchar(1200) default null,
60 `body` longtext not null,
61 `artifact_checksum` varchar(200) not null default 'manual record',
62 `creation_timestamp` datetime not null default current_timestamp,
63 primary key (`artifact_uuid`)
64) engine=innodb default charset=latin1;
65
66
67
68
69create table `heat_template` (
70 `artifact_uuid` varchar(200) not null,
71 `name` varchar(200) not null,
72 `version` varchar(20) not null,
73 `description` varchar(1200) default null,
74 `body` longtext not null,
75 `timeout_minutes` int(11) default null,
76 `artifact_checksum` varchar(200) not null default 'manual record',
77 `creation_timestamp` datetime not null default current_timestamp,
78 primary key (`artifact_uuid`)
79) engine=innodb default charset=latin1;
80
81
82
83create table `heat_nested_template` (
84 `parent_heat_template_uuid` varchar(200) not null,
85 `child_heat_template_uuid` varchar(200) not null,
86 `provider_resource_file` varchar(100) default null,
87 primary key (`parent_heat_template_uuid`,`child_heat_template_uuid`),
88 key `fk_heat_nested_template__heat_template2_idx` (`child_heat_template_uuid`),
89 constraint `fk_heat_nested_template__child_heat_temp_uuid__heat_template1` foreign key (`child_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
90 constraint `fk_heat_nested_template__parent_heat_temp_uuid__heat_template1` foreign key (`parent_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
91) engine=innodb default charset=latin1;
92
93
94
95
96create table `heat_template_params` (
97 `heat_template_artifact_uuid` varchar(200) not null,
98 `param_name` varchar(100) not null,
99 `is_required` bit(1) not null,
100 `param_type` varchar(20) default null,
101 `param_alias` varchar(45) default null,
102 primary key (`heat_template_artifact_uuid`,`param_name`),
103 constraint `fk_heat_template_params__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
104) engine=innodb default charset=latin1;
105
106
107
108create table `network_recipe` (
109 `id` int(11) not null auto_increment,
110 `model_name` varchar(20) not null,
111 `action` varchar(50) not null,
112 `description` varchar(1200) default null,
113 `orchestration_uri` varchar(256) not null,
114 `network_param_xsd` varchar(2048) default null,
115 `recipe_timeout` int(11) default null,
116 `service_type` varchar(45) default null,
117 `creation_timestamp` datetime not null default current_timestamp,
118 `version_str` varchar(20) not null,
119 primary key (`id`),
120 unique key `uk_rl4f296i0p8lyokxveaiwkayi` (`model_name`,`action`,`version_str`)
121) engine=innodb auto_increment=178 default charset=latin1;
122
123
124
125
126create table `temp_network_heat_template_lookup` (
127 `network_resource_model_name` varchar(200) not null,
128 `heat_template_artifact_uuid` varchar(200) not null,
129 `aic_version_min` varchar(20) not null,
130 `aic_version_max` varchar(20) default null,
131 primary key (`network_resource_model_name`),
132 key `fk_temp_network_heat_template_lookup__heat_template1_idx` (`heat_template_artifact_uuid`),
133 constraint `fk_temp_network_heat_template_lookup__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
134) engine=innodb default charset=latin1;
135
136
137
138create table `network_resource` (
139 `model_uuid` varchar(200) not null,
140 `model_name` varchar(200) not null,
141 `model_invariant_uuid` varchar(200) default null,
142 `description` varchar(1200) default null,
143 `heat_template_artifact_uuid` varchar(200) not null,
144 `neutron_network_type` varchar(20) default null,
145 `model_version` varchar(20) default null,
146 `tosca_node_type` varchar(200) default null,
147 `aic_version_min` varchar(20) not null,
148 `aic_version_max` varchar(20) default null,
149 `orchestration_mode` varchar(20) default 'heat',
150 `resource_category` varchar(20) default null,
151 `resource_sub_category` varchar(20) default null,
152 `creation_timestamp` datetime not null default current_timestamp,
153 primary key (`model_uuid`),
154 key `fk_network_resource__temp_network_heat_template_lookup1_idx` (`model_name`),
155 key `fk_network_resource__heat_template1_idx` (`heat_template_artifact_uuid`),
156 constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade,
157 constraint `fk_network_resource__temp_network_heat_template_lookup__mod_nm1` foreign key (`model_name`) references `temp_network_heat_template_lookup` (`network_resource_model_name`) on delete no action on update no action
158) engine=innodb default charset=latin1;
159
160
161
162
163
164create table `network_resource_customization` (
165 `model_customization_uuid` varchar(200) not null,
166 `model_instance_name` varchar(200) not null,
167 `network_technology` varchar(45) default null,
168 `network_type` varchar(45) default null,
169 `network_role` varchar(200) default null,
170 `network_scope` varchar(45) default null,
171 `creation_timestamp` datetime not null default current_timestamp,
172 `network_resource_model_uuid` varchar(200) not null,
173 primary key (`model_customization_uuid`),
174 key `fk_network_resource_customization__network_resource1_idx` (`network_resource_model_uuid`),
175 constraint `fk_network_resource_customization__network_resource1` foreign key (`network_resource_model_uuid`) references `network_resource` (`model_uuid`) on delete cascade on update cascade
176) engine=innodb default charset=latin1;
177
178
179
180
181
182create table `tosca_csar` (
183 `artifact_uuid` varchar(200) not null,
184 `name` varchar(200) not null,
185 `version` varchar(20) not null,
186 `description` varchar(1200) default null,
187 `artifact_checksum` varchar(200) not null,
188 `url` varchar(200) not null,
189 `creation_timestamp` datetime not null default current_timestamp,
190 primary key (`artifact_uuid`)
191) engine=innodb default charset=latin1;
192
193
194
195
196create table `service` (
197 `model_uuid` varchar(200) not null,
198 `model_name` varchar(200) not null,
199 `model_invariant_uuid` varchar(200) not null,
200 `model_version` varchar(20) not null,
201 `description` varchar(1200) default null,
202 `creation_timestamp` datetime not null default current_timestamp,
203 `tosca_csar_artifact_uuid` varchar(200) default null,
204 `service_type` varchar(200) default null,
205 `service_role` varchar(200) default null,
206 `environment_context` varchar(200) default null,
207 `workload_context` varchar(200) default null,
208 `service_category` varchar(200) default null,
209 primary key (`model_uuid`),
210 key `fk_service__tosca_csar1_idx` (`tosca_csar_artifact_uuid`),
211 constraint `fk_service__tosca_csar1` foreign key (`tosca_csar_artifact_uuid`) references `tosca_csar` (`artifact_uuid`) on delete cascade on update cascade
212) engine=innodb default charset=latin1;
213
214
215
216create table `service_recipe` (
217 `id` int(11) not null auto_increment,
218 `action` varchar(50) not null,
219 `version_str` varchar(20) default null,
220 `description` varchar(1200) default null,
221 `orchestration_uri` varchar(256) not null,
222 `service_param_xsd` varchar(2048) default null,
223 `recipe_timeout` int(11) default null,
224 `service_timeout_interim` int(11) default null,
225 `creation_timestamp` datetime not null default current_timestamp,
226 `service_model_uuid` varchar(200) not null,
227 primary key (`id`),
228 unique key `uk_7fav5dkux2v8g9d2i5ymudlgc` (`service_model_uuid`,`action`),
229 key `fk_service_recipe__service1_idx` (`service_model_uuid`),
230 constraint `fk_service_recipe__service1` foreign key (`service_model_uuid`) references `service` (`model_uuid`) on delete cascade on update cascade
231) engine=innodb auto_increment=86 default charset=latin1;
232
233
234
235create table `vnf_resource` (
236 `orchestration_mode` varchar(20) not null default 'heat',
237 `description` varchar(1200) default null,
238 `creation_timestamp` datetime not null default current_timestamp,
239 `model_uuid` varchar(200) not null,
240 `aic_version_min` varchar(20) default null,
241 `aic_version_max` varchar(20) default null,
242 `model_invariant_uuid` varchar(200) default null,
243 `model_version` varchar(20) not null,
244 `model_name` varchar(200) default null,
245 `tosca_node_type` varchar(200) default null,
246 `resource_category` varchar(200) default null,
247 `resource_sub_category` varchar(200) default null,
248 `heat_template_artifact_uuid` varchar(200) default null,
249 primary key (`model_uuid`),
250 key `fk_vnf_resource__heat_template1` (`heat_template_artifact_uuid`),
251 constraint `fk_vnf_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
252) engine=innodb default charset=latin1;
253
254
255
256
257create table `vf_module` (
258 `model_uuid` varchar(200) not null,
259 `model_invariant_uuid` varchar(200) default null,
260 `model_version` varchar(20) not null,
261 `model_name` varchar(200) not null,
262 `description` varchar(1200) default null,
263 `is_base` int(11) not null,
264 `heat_template_artifact_uuid` varchar(200) default null,
265 `vol_heat_template_artifact_uuid` varchar(200) default null,
266 `creation_timestamp` datetime not null default current_timestamp,
267 `vnf_resource_model_uuid` varchar(200) not null,
268 primary key (`model_uuid`,`vnf_resource_model_uuid`),
269 key `fk_vf_module__vnf_resource1_idx` (`vnf_resource_model_uuid`),
270 key `fk_vf_module__heat_template_art_uuid__heat_template1_idx` (`heat_template_artifact_uuid`),
271 key `fk_vf_module__vol_heat_template_art_uuid__heat_template2_idx` (`vol_heat_template_artifact_uuid`),
272 constraint `fk_vf_module__heat_template_art_uuid__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
273 constraint `fk_vf_module__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade,
274 constraint `fk_vf_module__vol_heat_template_art_uuid__heat_template2` foreign key (`vol_heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
275) engine=innodb default charset=latin1;
276
277
278
279/*!40101 set @saved_cs_client = @@character_set_client */;
280/*!40101 set character_set_client = utf8 */;
281create table `vf_module_customization` (
282 `model_customization_uuid` varchar(200) not null,
283 `label` varchar(200) default null,
284 `initial_count` int(11) default '0',
285 `min_instances` int(11) default '0',
286 `max_instances` int(11) default null,
287 `availability_zone_count` int(11) default null,
288 `heat_environment_artifact_uuid` varchar(200) default null,
289 `vol_environment_artifact_uuid` varchar(200) default null,
290 `creation_timestamp` datetime not null default current_timestamp,
291 `vf_module_model_uuid` varchar(200) not null,
292 primary key (`model_customization_uuid`),
293 key `fk_vf_module_customization__vf_module1_idx` (`vf_module_model_uuid`),
294 key `fk_vf_module_customization__heat_env__heat_environment1_idx` (`heat_environment_artifact_uuid`),
295 key `fk_vf_module_customization__vol_env__heat_environment2_idx` (`vol_environment_artifact_uuid`),
296 constraint `fk_vf_module_customization__heat_env__heat_environment1` foreign key (`heat_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade,
297 constraint `fk_vf_module_customization__vf_module1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade,
298 constraint `fk_vf_module_customization__vol_env__heat_environment2` foreign key (`vol_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade
299) engine=innodb default charset=latin1;
300/*!40101 set character_set_client = @saved_cs_client */;
301
302--
303-- table structure for table `vf_module_to_heat_files`
304--
305
306
307/*!40101 set @saved_cs_client = @@character_set_client */;
308/*!40101 set character_set_client = utf8 */;
309create table `vf_module_to_heat_files` (
310 `vf_module_model_uuid` varchar(200) not null,
311 `heat_files_artifact_uuid` varchar(200) not null,
312 primary key (`vf_module_model_uuid`,`heat_files_artifact_uuid`),
313 key `fk_vf_module_to_heat_files__heat_files__artifact_uuid1_idx` (`heat_files_artifact_uuid`),
314 constraint `fk_vf_module_to_heat_files__heat_files__artifact_uuid1` foreign key (`heat_files_artifact_uuid`) references `heat_files` (`artifact_uuid`) on delete cascade on update cascade,
315 constraint `fk_vf_module_to_heat_files__vf_module__model_uuid1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade
316) engine=innodb default charset=latin1 comment='il fait ce qu''il dit';
317/*!40101 set character_set_client = @saved_cs_client */;
318
319--
320-- table structure for table `vnf_components`
321--
322
323
324/*!40101 set @saved_cs_client = @@character_set_client */;
325/*!40101 set character_set_client = utf8 */;
326create table `vnf_components` (
327 `vnf_id` int(11) not null,
328 `component_type` varchar(20) not null,
329 `heat_template_id` int(11) default null,
330 `heat_environment_id` int(11) default null,
331 `creation_timestamp` datetime not null default current_timestamp,
332 primary key (`vnf_id`,`component_type`)
333) engine=innodb default charset=latin1;
334/*!40101 set character_set_client = @saved_cs_client */;
335
336--
337-- table structure for table `vnf_components_recipe`
338--
339
340
341
342create table `vnf_components_recipe` (
343 `id` int(11) not null auto_increment,
344 `vnf_type` varchar(200) default null,
345 `vnf_component_type` varchar(45) not null,
346 `action` varchar(50) not null,
347 `service_type` varchar(45) default null,
348 `version` varchar(20) not null,
349 `description` varchar(1200) default null,
350 `orchestration_uri` varchar(256) not null,
351 `vnf_component_param_xsd` varchar(2048) default null,
352 `recipe_timeout` int(11) default null,
353 `creation_timestamp` datetime default current_timestamp,
354 `vf_module_model_uuid` varchar(200) default null,
355 primary key (`id`),
356 unique key `uk_4dpdwddaaclhc11wxsb7h59ma` (`vf_module_model_uuid`,`vnf_component_type`,`action`,`version`)
357) engine=innodb auto_increment=26 default charset=latin1;
358
359
360
361
362create table `vnf_recipe` (
363 `id` int(11) not null auto_increment,
364 `nf_role` varchar(200) default null,
365 `action` varchar(50) not null,
366 `service_type` varchar(45) default null,
367 `version_str` varchar(20) not null,
368 `description` varchar(1200) default null,
369 `orchestration_uri` varchar(256) not null,
370 `vnf_param_xsd` varchar(2048) default null,
371 `recipe_timeout` int(11) default null,
372 `creation_timestamp` datetime default current_timestamp,
373 `vf_module_id` varchar(100) default null,
374 primary key (`id`),
375 unique key `uk_f3tvqau498vrifq3cr8qnigkr` (`vf_module_id`,`action`,`version_str`)
376) engine=innodb auto_increment=10006 default charset=latin1;
377
378
379
380
381
382
383
384
385create table `vnf_resource_customization` (
386 `model_customization_uuid` varchar(200) not null,
387 `model_instance_name` varchar(200) not null,
388 `min_instances` int(11) default null,
389 `max_instances` int(11) default null,
390 `availability_zone_max_count` int(11) default null,
391 `nf_type` varchar(200) default null,
392 `nf_role` varchar(200) default null,
393 `nf_function` varchar(200) default null,
394 `nf_naming_code` varchar(200) default null,
395 `creation_timestamp` datetime not null default current_timestamp,
396 `vnf_resource_model_uuid` varchar(200) not null,
397 `multi_stage_design` varchar(20) default null,
398 primary key (`model_customization_uuid`),
399 key `fk_vnf_resource_customization__vnf_resource1_idx` (`vnf_resource_model_uuid`),
400 constraint `fk_vnf_resource_customization__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade
401) engine=innodb default charset=latin1;
402
403
404
405
406create table `vnf_res_custom_to_vf_module_custom` (
407 `vnf_resource_cust_model_customization_uuid` varchar(200) not null,
408 `vf_module_cust_model_customization_uuid` varchar(200) not null,
409 `creation_timestamp` datetime not null default current_timestamp,
410 primary key (`vnf_resource_cust_model_customization_uuid`,`vf_module_cust_model_customization_uuid`),
411 key `fk_vnf_res_custom_to_vf_module_custom__vf_module_customizat_idx` (`vf_module_cust_model_customization_uuid`),
412 constraint `fk_vnf_res_custom_to_vf_module_custom__vf_module_customization1` foreign key (`vf_module_cust_model_customization_uuid`) references `vf_module_customization` (`model_customization_uuid`) on delete cascade on update cascade,
413 constraint `fk_vnf_res_custom_to_vf_module_custom__vnf_resource_customiza1` foreign key (`vnf_resource_cust_model_customization_uuid`) references `vnf_resource_customization` (`model_customization_uuid`) on delete cascade on update cascade
414) engine=innodb default charset=latin1;
415
416
417create table if not exists `external_service_to_internal_model_mapping` (
418id int(11) not null,
419service_name varchar(200) not null,
420product_flavor varchar(200) null,
421subscription_service_type varchar(200) not null,
422service_model_uuid varchar(200) not null,
423primary key (id),
424unique index uk_external_service_to_internal_model_mapping
425(service_name asc, product_flavor asc, service_model_uuid asc));
426
427create table if not exists `collection_resource` (
428 model_uuid varchar(200) not null,
429 model_name varchar(200) not null,
430 model_invariant_uuid varchar(200) not null,
431 model_version varchar(20) not null,
432 tosca_node_type varchar(200) not null,
433 description varchar(200),
434 creation_timestamp datetime not null default current_timestamp,
435 primary key (`model_uuid`)
436)engine=innodb default charset=latin1;
437
438create table if not exists `collection_resource_customization` (
439 model_customization_uuid varchar(200) not null,
440 model_instance_name varchar(200) not null,
441 role varchar(200) NULL,
442 object_type varchar(200) not null,
443 function varchar(200) NULL,
444 collection_resource_type varchar(200) NULL,
445 creation_timestamp datetime not null default current_timestamp,
446 cr_model_uuid varchar(200) not null,
447 primary key (`model_customization_uuid`)
448)engine=innodb default charset=latin1;
449
450create table if not exists `instance_group` (
451 model_uuid varchar(200) not null,
452 model_name varchar(200) not null,
453 model_invariant_uuid varchar(200) not null,
454 model_version varchar(20) not null,
455 tosca_node_type varchar(200) NULL,
456 role varchar(200) not null,
457 object_type varchar(200) not null,
458 creation_timestamp datetime not null default current_timestamp,
459 cr_model_uuid varchar(200) not null,
460 instance_group_type varchar(200) not null,
461 primary key (`model_uuid`)
462)engine=innodb default charset=latin1;
463
464
465create table if not exists `collection_resource_instance_group_customization` (
466 `collection_resource_customization_model_uuid` varchar(200) not null,
467 `instance_group_model_uuid` varchar(200) not null,
468 `function` varchar(200) null,
469 `description` varchar(1200) null,
470 `subinterface_network_quantity` int(11) null,
471 `creation_timestamp` datetime not null default current_timestamp,
472 primary key (`collection_resource_customization_model_uuid`, `instance_group_model_uuid`),
473 index `fk_collection_resource_instance_group_customization__instan_idx` (`instance_group_model_uuid` asc),
474 constraint `fk_collection_resource_instance_group_customization__collecti1`
475 foreign key (`collection_resource_customization_model_uuid`)
476 references `collection_resource_customization` (`model_customization_uuid`)
477 on delete cascade
478 on update cascade,
479 constraint `fk_collection_resource_instance_group_customization__instance1`
480 foreign key (`instance_group_model_uuid`)
481 references `instance_group` (`model_uuid`)
482 on delete cascade
483 on update cascade)
484engine = innodb
485default character set = latin1;
486
487create table if not exists `vnfc_instance_group_customization` (
488 `vnf_resource_customization_model_uuid` varchar(200) not null,
489 `instance_group_model_uuid` varchar(200) not null,
490 `function` varchar(200) null,
491 `description` varchar(1200) null,
492 `creation_timestamp` datetime not null default current_timestamp,
493 primary key (`vnf_resource_customization_model_uuid`, `instance_group_model_uuid`),
494 index `fk_vnfc_instance_group_customization__instance_group1_idx` (`instance_group_model_uuid` asc),
495 constraint `fk_vnfc_instance_group_customization__vnf_resource_customizat1`
496 foreign key (`vnf_resource_customization_model_uuid`)
497 references `vnf_resource_customization` (`model_customization_uuid`)
498 on delete cascade
499 on update cascade,
500 constraint `fk_vnfc_instance_group_customization__instance_group1`
501 foreign key (`instance_group_model_uuid`)
502 references `instance_group` (`model_uuid`)
503 on delete cascade
504 on update cascade)
505engine = innodb
506default character set = latin1;
507
508 create table if not exists `configuration`
509 ( `model_uuid` varchar(200) not null,
510 `model_invariant_uuid` varchar(200) not null,
511 `model_version` varchar(20) not null,
512 `model_name` varchar(200) not null,
513 `tosca_node_type` varchar(200) not null,
514 `description` varchar(1200) null,
515 `creation_timestamp` datetime not null default current_timestamp,
516 primary key (`model_uuid`))
517 engine = innodb auto_increment = 20654
518 default character set = latin1;
519
520 create table if not exists `service_proxy` (
521 `model_uuid` varchar(200) not null,
522 `model_invariant_uuid` varchar(200) not null,
523 `model_version` varchar(20) not null,
524 `model_name` varchar(200) not null,
525 `description` varchar(1200) null,
526 `creation_timestamp` datetime not null default current_timestamp,
527 primary key (`model_uuid`))
528 engine = innodb auto_increment = 20654
529 default character set = latin1;
530
531create table if not exists `service_proxy_customization` (
532`model_customization_uuid` varchar(200) not null,
533`model_instance_name` varchar(200) not null,
534`tosca_node_type` varchar(200) not null,
535`source_service_model_uuid` varchar(200) not null,
536`creation_timestamp` datetime not null default current_timestamp,
537`service_proxy_model_uuid` varchar(200) not null,
538primary key (`model_customization_uuid`),
539index `fk_service_proxy_customization__service_proxy1_idx` (`service_proxy_model_uuid` asc),
540index `fk_service_proxy_customization__service1_idx` (`source_service_model_uuid` asc),
541constraint`fk_spr_customization__service_proxy_resource1`
542foreign key (`service_proxy_model_uuid`) references `service_proxy` (`model_uuid`)
543on delete cascade on update cascade,
544constraint `fk_service_proxy_resource_customization__service1`
545foreign key (`source_service_model_uuid`) references `service`
546(`model_uuid`) on delete cascade on update cascade)
547engine = innodb
548auto_increment = 20654
549default character set = latin1;
550
551create table if not exists `configuration_customization` (
552`model_customization_uuid` varchar(200) not null,
553`model_instance_name` varchar(200) not null,
554`configuration_type` varchar(200) null,
555`configuration_role` varchar(200) null,
556`configuration_function` varchar(200) null,
557`creation_timestamp` datetime not null default current_timestamp,
558`configuration_model_uuid` varchar(200) not null,
559`service_proxy_customization_model_customization_uuid` varchar(200) null,
560`configuration_customization_model_customization_uuid` varchar(200) null,
561primary key (`model_customization_uuid`),
562index `fk_configuration_customization__configuration_idx` (`configuration_model_uuid` asc),
563index `fk_configuration_customization__service_proxy_customization_idx`
564(`service_proxy_customization_model_customization_uuid` asc),
565index `fk_configuration_customization__configuration_customization_idx`
566(`configuration_customization_model_customization_uuid` asc),
567constraint `fk_configuration_resource_customization__configuration_resour1`
568foreign key (`configuration_model_uuid`) references `configuration` (`model_uuid`)
569on delete cascade on update cascade,
570constraint `fk_configuration_customization__service_proxy_customization1` foreign
571key (`service_proxy_customization_model_customization_uuid`) references
572`service_proxy_customization` (`model_customization_uuid`)
573on delete cascade on update cascade, constraint
574`fk_configuration_customization__configuration_customization1` foreign
575key (`configuration_customization_model_customization_uuid`) references
576`configuration_customization` (`model_customization_uuid`)
577on delete cascade on update cascade)
578engine = innodb
579auto_increment =20654
580default character set = latin1;
581
582
583create table `service_proxy_customization_to_service` (
584 `service_model_uuid` varchar(200) not null,
585 `resource_model_customization_uuid` varchar(200) not null,
586 primary key (`service_model_uuid`,`resource_model_customization_uuid`)
587)engine=innodb default charset=latin1;
588
589
590create table `configuration_customization_to_service` (
591 `service_model_uuid` varchar(200) not null,
592 `resource_model_customization_uuid` varchar(200) not null,
593 primary key (`service_model_uuid`,`resource_model_customization_uuid`)
594)engine=innodb default charset=latin1;
595
596
597create table if not exists `collection_resource_customization_to_service` (
598 `service_model_uuid` varchar(200) not null,
599 `resource_model_customization_uuid` varchar(200) not null,
600 primary key (`service_model_uuid`,`resource_model_customization_uuid`)
601)engine=innodb default charset=latin1;
602
603
604create table `network_resource_customization_to_service` (
605 `service_model_uuid` varchar(200) not null,
606 `resource_model_customization_uuid` varchar(200) not null,
607 primary key (`service_model_uuid`,`resource_model_customization_uuid`)
608)engine=innodb default charset=latin1;
609
610create table `vnf_resource_customization_to_service` (
611 `service_model_uuid` varchar(200) not null,
612 `resource_model_customization_uuid` varchar(200) not null,
613 primary key (`service_model_uuid`,`resource_model_customization_uuid`)
614)engine=innodb default charset=latin1;
615
616create table `allotted_resource_customization_to_service` (
617 `service_model_uuid` varchar(200) not null,
618 `resource_model_customization_uuid` varchar(200) not null,
619 primary key (`service_model_uuid`,`resource_model_customization_uuid`)
620)engine=innodb default charset=latin1;
621
622
623
624create table ar_recipe (
625 ID INT(11) not null auto_increment,
626 MODEL_NAME VARCHAR(200) NOT NULL,
627 `ACTION` VARCHAR(200) NOT NULL,
628 VERSION_STR VARCHAR(200) NOT NULL,
629 SERVICE_TYPE VARCHAR(200),
630 DESCRIPTION VARCHAR(200),
631 ORCHESTRATION_URI VARCHAR(200) NOT NULL,
632 AR_PARAM_XSD VARCHAR(200),
633 RECIPE_TIMEOUT INT(10),
634 CREATION_TIMESTAMP DATETIME NOT NULL default current_timestamp,
635 primary key (ID),
636 unique key `uk_ar_recipe` (`model_name`,`action`,`version_str`)
637) ENGINE=InnoDB DEFAULT CHARSET=latin1;
638
639alter table collection_resource_customization
640add foreign key ( cr_model_uuid)
641references collection_resource(model_uuid)
642on delete cascade;
643
644alter table vnf_resource_customization
645add column
646instance_group_model_uuid varchar(200);
647
648alter table network_resource_customization
649add column
650instance_group_model_uuid varchar(200);
651
652
653alter table network_resource_customization
654add foreign key ( instance_group_model_uuid)
655references instance_group(model_uuid)
656on delete cascade;
657
658alter table collection_resource_customization_to_service
659add foreign key (service_model_uuid)
660references service(model_uuid)
661on delete cascade;
662
663alter table allotted_resource_customization_to_service
664add foreign key (service_model_uuid)
665references service(model_uuid)
666on delete cascade;
667
668
669alter table vnf_resource_customization_to_service
670add foreign key (service_model_uuid)
671references service(model_uuid)
672on delete cascade;
673
674
675alter table network_resource_customization_to_service
676add foreign key (service_model_uuid)
677references service(model_uuid)
678on delete cascade;
679
680
681alter table network_resource_customization_to_service
682add foreign key (resource_model_customization_uuid)
683references network_resource_customization(model_customization_uuid)
684on delete cascade;
685
686alter table vnf_resource_customization_to_service
687add foreign key (resource_model_customization_uuid)
688references vnf_resource_customization(model_customization_uuid)
689on delete cascade;
690
691alter table allotted_resource_customization_to_service
692add foreign key (resource_model_customization_uuid)
693references allotted_resource_customization(model_customization_uuid)
694on delete cascade;
695
696alter table collection_resource_customization_to_service
697add foreign key (resource_model_customization_uuid)
698references collection_resource_customization(model_customization_uuid)
699on delete cascade;
700
701
702create table if not exists `collection_network_resource_customization` (
703`model_customization_uuid` varchar(200) not null,
704`model_instance_name` varchar(200) not null,
705`network_technology` varchar(45) null,
706`network_type` varchar(45) null,
707`network_role` varchar(200) null,
708`network_scope` varchar(45) null,
709`creation_timestamp` datetime not null default current_timestamp,
710`network_resource_model_uuid` varchar(200) not null, `instance_group_model_uuid` varchar(200) null,
711`crc_model_customization_uuid` varchar(200) not null, primary key
712(`model_customization_uuid`, `crc_model_customization_uuid`),
713index `fk_collection_net_resource_customization__network_resource1_idx`
714(`network_resource_model_uuid` asc), index
715`fk_collection_net_resource_customization__instance_group1_idx`
716(`instance_group_model_uuid` asc), index
717`fk_col_net_res_customization__collection_res_customization_idx`
718(`crc_model_customization_uuid` asc), constraint
719`fk_collection_net_resource_customization__network_resource10` foreign
720key (`network_resource_model_uuid`) references
721`network_resource` (`model_uuid`) on delete cascade on
722update cascade, constraint
723`fk_collection_net_resource_customization__instance_group10` foreign key
724(`instance_group_model_uuid`) references `instance_group`
725(`model_uuid`) on delete cascade on update cascade, constraint
726`fk_collection_network_resource_customization__collection_reso1` foreign
727key (`crc_model_customization_uuid`) references
728`collection_resource_customization`
729(`model_customization_uuid`) on delete cascade on update cascade) engine
730= innodb default character set = latin1;
731
732CREATE TABLE IF NOT EXISTS `rainy_day_handler_macro` (
733`id` INT(11) NOT NULL AUTO_INCREMENT,
734`FLOW_NAME` VARCHAR(200) NOT NULL,
735`SERVICE_TYPE` VARCHAR(200) NOT NULL,
736`VNF_TYPE` VARCHAR(200) NOT NULL,
737`ERROR_CODE` VARCHAR(200) NOT NULL,
738`WORK_STEP` VARCHAR(200) NOT NULL,
739`POLICY` VARCHAR(200) NOT NULL,
740PRIMARY KEY (`id`))
741ENGINE = InnoDB
742DEFAULT CHARACTER SET = latin1;
743
744CREATE TABLE IF NOT EXISTS `northbound_request_ref_lookup` (
745`id` INT(11) NOT NULL AUTO_INCREMENT,
746`REQUEST_SCOPE` VARCHAR(200) NOT NULL,
747`ACTION` VARCHAR(200) NOT NULL,
748`MACRO_ACTION` VARCHAR(200) NOT NULL,
749`IS_ALACARTE` TINYINT(1) NOT NULL DEFAULT 0,
750`IS_TOPLEVELFLOW` TINYINT(1) NOT NULL DEFAULT 0,
751`MIN_API_VERSION` DOUBLE NOT NULL,
752`MAX_API_VERSION` DOUBLE NULL,
753PRIMARY KEY (`id`),
754UNIQUE INDEX `UK_northbound_request_ref_lookup` (`MIN_API_VERSION` ASC, `REQUEST_SCOPE` ASC, `ACTION` ASC, `IS_ALACARTE` ASC))
755ENGINE = InnoDB
756DEFAULT CHARACTER SET = latin1;
757
758CREATE TABLE IF NOT EXISTS `orchestration_flow_reference` (
759`id` INT(11) NOT NULL AUTO_INCREMENT,
760`COMPOSITE_ACTION` VARCHAR(200) NOT NULL,
761`SEQ_NO` INT(11) NOT NULL,
762`FLOW_NAME` VARCHAR(200) NOT NULL,
763`FLOW_VERSION` DOUBLE NOT NULL,
764`NB_REQ_REF_LOOKUP_ID` INT(11) NOT NULL,
765PRIMARY KEY (`id`),
766INDEX `fk_orchestration_flow_reference__northbound_req_ref_look_idx` (`NB_REQ_REF_LOOKUP_ID` ASC),
767UNIQUE INDEX `UK_orchestration_flow_reference` (`COMPOSITE_ACTION` ASC, `FLOW_NAME` ASC, `SEQ_NO` ASC, `NB_REQ_REF_LOOKUP_ID` ASC),
768CONSTRAINT `fk_orchestration_flow_reference__northbound_request_ref_look1`
769FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` (`id`)
770ON DELETE CASCADE ON UPDATE CASCADE)
771ENGINE = InnoDB DEFAULT CHARACTER SET = latin1;
772
773--------START Request DB SCHEMA --------
774CREATE DATABASE requestdb;
775USE requestdb;
776
777
778CREATE TABLE `infra_active_requests` (
779 `REQUEST_ID` varchar(45) NOT NULL,
780 `CLIENT_REQUEST_ID` varchar(45) DEFAULT NULL,
781 `ACTION` varchar(45) DEFAULT NULL,
782 `REQUEST_STATUS` varchar(20) DEFAULT NULL,
783 `STATUS_MESSAGE` longtext DEFAULT NULL,
784 `PROGRESS` bigint(20) DEFAULT NULL,
785 `START_TIME` datetime DEFAULT NULL,
786 `END_TIME` datetime DEFAULT NULL,
787 `SOURCE` varchar(45) DEFAULT NULL,
788 `VNF_ID` varchar(45) DEFAULT NULL,
789 `VNF_NAME` varchar(80) DEFAULT NULL,
790 `VNF_TYPE` varchar(200) DEFAULT NULL,
791 `SERVICE_TYPE` varchar(45) DEFAULT NULL,
792 `AIC_NODE_CLLI` varchar(11) DEFAULT NULL,
793 `TENANT_ID` varchar(45) DEFAULT NULL,
794 `PROV_STATUS` varchar(20) DEFAULT NULL,
795 `VNF_PARAMS` longtext,
796 `VNF_OUTPUTS` longtext,
797 `REQUEST_BODY` longtext,
798 `RESPONSE_BODY` longtext,
799 `LAST_MODIFIED_BY` varchar(100) DEFAULT NULL,
800 `MODIFY_TIME` datetime DEFAULT NULL,
801 `REQUEST_TYPE` varchar(20) DEFAULT NULL,
802 `VOLUME_GROUP_ID` varchar(45) DEFAULT NULL,
803 `VOLUME_GROUP_NAME` varchar(45) DEFAULT NULL,
804 `VF_MODULE_ID` varchar(45) DEFAULT NULL,
805 `VF_MODULE_NAME` varchar(200) DEFAULT NULL,
806 `VF_MODULE_MODEL_NAME` varchar(200) DEFAULT NULL,
807 `AAI_SERVICE_ID` varchar(50) DEFAULT NULL,
808 `AIC_CLOUD_REGION` varchar(11) DEFAULT NULL,
809 `CALLBACK_URL` varchar(200) DEFAULT NULL,
810 `CORRELATOR` varchar(80) DEFAULT NULL,
811 `NETWORK_ID` varchar(45) DEFAULT NULL,
812 `NETWORK_NAME` varchar(80) DEFAULT NULL,
813 `NETWORK_TYPE` varchar(80) DEFAULT NULL,
814 `REQUEST_SCOPE` varchar(45) NOT NULL DEFAULT 'unknown',
815 `REQUEST_ACTION` varchar(45) NOT NULL DEFAULT 'unknown',
816 `SERVICE_INSTANCE_ID` varchar(45) DEFAULT NULL,
817 `SERVICE_INSTANCE_NAME` varchar(80) DEFAULT NULL,
818 `REQUESTOR_ID` varchar(50) DEFAULT NULL,
819 `CONFIGURATION_ID` varchar(45) DEFAULT NULL,
820 `CONFIGURATION_NAME` varchar(200) DEFAULT NULL,
821 `OPERATIONAL_ENV_ID` varchar(45) DEFAULT NULL,
822 `OPERATIONAL_ENV_NAME` varchar(200) DEFAULT NULL,
823 PRIMARY KEY (`REQUEST_ID`),
824 UNIQUE KEY `UK_bhu6w8p7wvur4pin0gjw2d5ak` (`CLIENT_REQUEST_ID`)
825) ENGINE=InnoDB DEFAULT CHARSET=latin1;
826
827CREATE TABLE `archived_infra_requests` (
828 `REQUEST_ID` varchar(45) NOT NULL,
829 `CLIENT_REQUEST_ID` varchar(45) DEFAULT NULL,
830 `ACTION` varchar(45) DEFAULT NULL,
831 `REQUEST_STATUS` varchar(20) DEFAULT NULL,
832 `STATUS_MESSAGE` longtext DEFAULT NULL,
833 `PROGRESS` bigint(20) DEFAULT NULL,
834 `START_TIME` datetime DEFAULT NULL,
835 `END_TIME` datetime DEFAULT NULL,
836 `SOURCE` varchar(45) DEFAULT NULL,
837 `VNF_ID` varchar(45) DEFAULT NULL,
838 `VNF_NAME` varchar(80) DEFAULT NULL,
839 `VNF_TYPE` varchar(200) DEFAULT NULL,
840 `SERVICE_TYPE` varchar(45) DEFAULT NULL,
841 `AIC_NODE_CLLI` varchar(11) DEFAULT NULL,
842 `TENANT_ID` varchar(45) DEFAULT NULL,
843 `PROV_STATUS` varchar(20) DEFAULT NULL,
844 `VNF_PARAMS` longtext,
845 `VNF_OUTPUTS` longtext,
846 `REQUEST_BODY` longtext,
847 `RESPONSE_BODY` longtext,
848 `LAST_MODIFIED_BY` varchar(100) DEFAULT NULL,
849 `MODIFY_TIME` datetime DEFAULT NULL,
850 `REQUEST_TYPE` varchar(20) DEFAULT NULL,
851 `VOLUME_GROUP_ID` varchar(45) DEFAULT NULL,
852 `VOLUME_GROUP_NAME` varchar(45) DEFAULT NULL,
853 `VF_MODULE_ID` varchar(45) DEFAULT NULL,
854 `VF_MODULE_NAME` varchar(200) DEFAULT NULL,
855 `VF_MODULE_MODEL_NAME` varchar(200) DEFAULT NULL,
856 `AAI_SERVICE_ID` varchar(50) DEFAULT NULL,
857 `AIC_CLOUD_REGION` varchar(11) DEFAULT NULL,
858 `CALLBACK_URL` varchar(200) DEFAULT NULL,
859 `CORRELATOR` varchar(80) DEFAULT NULL,
860 `NETWORK_ID` varchar(45) DEFAULT NULL,
861 `NETWORK_NAME` varchar(80) DEFAULT NULL,
862 `NETWORK_TYPE` varchar(80) DEFAULT NULL,
863 `REQUEST_SCOPE` varchar(20) NOT NULL DEFAULT 'unknown',
864 `REQUEST_ACTION` varchar(45) NOT NULL DEFAULT 'unknown',
865 `SERVICE_INSTANCE_ID` varchar(45) DEFAULT NULL,
866 `SERVICE_INSTANCE_NAME` varchar(80) DEFAULT NULL,
867 `REQUESTOR_ID` varchar(50) DEFAULT NULL,
868 `CONFIGURATION_ID` varchar(45) DEFAULT NULL,
869 `CONFIGURATION_NAME` varchar(200) DEFAULT NULL,
870 `OPERATIONAL_ENV_ID` varchar(45) DEFAULT NULL,
871 `OPERATIONAL_ENV_NAME` varchar(200) DEFAULT NULL,
872 PRIMARY KEY (`REQUEST_ID`),
873 UNIQUE KEY `UK_bhu6w8p7wvur4pin0gjw2d59h` (`CLIENT_REQUEST_ID`)
874) ENGINE=InnoDB DEFAULT CHARSET=latin1;
875
876CREATE TABLE `site_status` (
877 `SITE_NAME` varchar(255) NOT NULL,
878 `STATUS` bit(1) DEFAULT NULL,
879 `CREATION_TIMESTAMP` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
880 PRIMARY KEY (`SITE_NAME`)
881) ENGINE=InnoDB DEFAULT CHARSET=latin1;
882
883CREATE TABLE `watchdog_distributionid_status` (
884 `DISTRIBUTION_ID` varchar(45) NOT NULL,
885 `DISTRIBUTION_ID_STATUS` varchar(45) DEFAULT NULL,
886 `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
887 `MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
888 PRIMARY KEY (`DISTRIBUTION_ID`)
889) ENGINE=InnoDB DEFAULT CHARSET=latin1;
890
891CREATE TABLE `watchdog_per_component_distribution_status` (
892 `DISTRIBUTION_ID` varchar(45) NOT NULL,
893 `COMPONENT_NAME` varchar(45) NOT NULL,
894 `COMPONENT_DISTRIBUTION_STATUS` varchar(45) DEFAULT NULL,
895 `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
896 `MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
897 PRIMARY KEY (`DISTRIBUTION_ID`,`COMPONENT_NAME`),
898 CONSTRAINT `fk_watchdog_component_distribution_status_watchdog_distributi1` FOREIGN KEY (`DISTRIBUTION_ID`) REFERENCES `watchdog_distributionid_status` (`DISTRIBUTION_ID`) ON DELETE CASCADE ON UPDATE CASCADE
899) ENGINE=InnoDB DEFAULT CHARSET=latin1;
900
901CREATE TABLE `watchdog_service_mod_ver_id_lookup` (
902 `DISTRIBUTION_ID` varchar(45) NOT NULL,
903 `SERVICE_MODEL_VERSION_ID` varchar(45) NOT NULL,
904 `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
905 `MODIFY_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
906 PRIMARY KEY (`DISTRIBUTION_ID`,`SERVICE_MODEL_VERSION_ID`)
907) ENGINE=InnoDB DEFAULT CHARSET=latin1;
908
909CREATE TABLE `activate_operational_env_service_model_distribution_status` (
910 `OPERATIONAL_ENV_ID` varchar(45) NOT NULL,
911 `SERVICE_MODEL_VERSION_ID` varchar(45) NOT NULL,
912 `REQUEST_ID` varchar(45) NOT NULL,
913 `SERVICE_MOD_VER_FINAL_DISTR_STATUS` varchar(45) DEFAULT NULL,
914 `RECOVERY_ACTION` varchar(30) DEFAULT NULL,
915 `RETRY_COUNT_LEFT` int(11) DEFAULT NULL,
916 `WORKLOAD_CONTEXT` varchar(80) NOT NULL,
917 `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
918 `MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
919 PRIMARY KEY (`OPERATIONAL_ENV_ID`,`SERVICE_MODEL_VERSION_ID`,`REQUEST_ID`)
920) ENGINE=InnoDB DEFAULT CHARSET=latin1;
921
922CREATE TABLE `activate_operational_env_per_distributionid_status` (
923 `DISTRIBUTION_ID` varchar(45) NOT NULL,
924 `DISTRIBUTION_ID_STATUS` varchar(45) DEFAULT NULL,
925 `DISTRIBUTION_ID_ERROR_REASON` varchar(250) DEFAULT NULL,
926 `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
927 `MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
928 `OPERATIONAL_ENV_ID` varchar(45) NOT NULL,
929 `SERVICE_MODEL_VERSION_ID` varchar(45) NOT NULL,
930 `REQUEST_ID` varchar(45) NOT NULL,
931 PRIMARY KEY (`DISTRIBUTION_ID`),
932 KEY `fk_activate_op_env_per_distributionid_status__aoesmds1_idx` (`OPERATIONAL_ENV_ID`,`SERVICE_MODEL_VERSION_ID`,`REQUEST_ID`),
933 CONSTRAINT `fk_activate_op_env_per_distributionid_status__aoesmds1` FOREIGN KEY (`OPERATIONAL_ENV_ID`, `SERVICE_MODEL_VERSION_ID`, `REQUEST_ID`) REFERENCES `activate_operational_env_service_model_distribution_status` (`OPERATIONAL_ENV_ID`, `SERVICE_MODEL_VERSION_ID`, `REQUEST_ID`) ON DELETE CASCADE ON UPDATE CASCADE
934) ENGINE=InnoDB DEFAULT CHARSET=latin1;
935
936create table operation_status (
937 SERVICE_ID varchar(255) not null,
938 OPERATION_ID varchar(255) not null,
939 SERVICE_NAME varchar(255),
940 OPERATION_TYPE varchar(255),
941 USER_ID varchar(255),
942 RESULT varchar(255),
943 OPERATION_CONTENT varchar(255),
944 PROGRESS varchar(255),
945 REASON varchar(255),
946 OPERATE_AT datetime NOT NULL,
947 FINISHED_AT datetime NOT NULL,
948 primary key (SERVICE_ID,OPERATION_ID)
949) ENGINE=InnoDB DEFAULT CHARSET=latin1;
950
951create table resource_operation_status (
952 SERVICE_ID varchar(255) not null,
953 OPERATION_ID varchar(255) not null,
954 RESOURCE_TEMPLATE_UUID varchar(255) not null,
955 OPER_TYPE varchar(255),
956 RESOURCE_INSTANCE_ID varchar(255),
957 JOB_ID varchar(255),
958 STATUS varchar(255),
959 PROGRESS varchar(255),
960 ERROR_CODE varchar(255) ,
961 STATUS_DESCRIPOTION varchar(255) ,
962 primary key (SERVICE_ID,OPERATION_ID,RESOURCE_TEMPLATE_UUID)
963) ENGINE=InnoDB DEFAULT CHARSET=latin1;
964
965create table if not exists model_recipe (
966 `ID` INT(11) NOT NULL AUTO_INCREMENT,
967 `MODEL_ID` INT(11),
968 `ACTION` VARCHAR(40),
969 `SCHEMA_VERSION` VARCHAR(40),
970 `DESCRIPTION` VARCHAR(40),
971 `ORCHESTRATION_URI` VARCHAR(20),
972 `MODEL_PARAM_XSD` VARCHAR(20),
973 `RECIPE_TIMEOUT` INT(11),
974 `CREATION_TIMESTAMP` datetime not null default current_timestamp,
975 PRIMARY KEY (`ID`),
976 CONSTRAINT uk1_model_recipe UNIQUE (`MODEL_ID`, `ACTION`)
977) ENGINE=InnoDB DEFAULT CHARSET=latin1;
978
979create table if not exists model (
980 `ID` INT(11) NOT NULL AUTO_INCREMENT,
981 `MODEL_CUSTOMIZATION_ID` VARCHAR(40),
982 `MODEL_CUSTOMIZATION_NAME` VARCHAR(40),
983 `MODEL_INVARIANT_ID` VARCHAR(40),
984 `MODEL_NAME` VARCHAR(40),
985 `MODEL_TYPE` VARCHAR(20),
986 `MODEL_VERSION` VARCHAR(20),
987 `MODEL_VERSION_ID` VARCHAR(40),
988 `CREATION_TIMESTAMP` datetime not null default current_timestamp,
989 `RECIPE` INT(11),
990 PRIMARY KEY (`ID`),
991 CONSTRAINT uk1_model UNIQUE (`MODEL_TYPE`, `MODEL_VERSION_ID`),
992 FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE
993) ENGINE=InnoDB DEFAULT CHARSET=latin1;