11USE process_tracker;
22
3+ create table process_tracker .dependency_type_lkup
4+ (
5+ dependency_type_id int auto_increment
6+ primary key ,
7+ dependency_type_name varchar (75 ) not null ,
8+ created_date_time timestamp default CURRENT_TIMESTAMP not null ,
9+ created_by int default 0 not null ,
10+ update_date_time timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP ,
11+ updated_by int default 0 not null ,
12+ constraint dependency_type_lkup_dependency_type_name_uindex
13+ unique (dependency_type_name)
14+ );
15+
316create table process_tracker .character_set_lkup
417(
518 character_set_id int auto_increment
@@ -253,6 +266,7 @@ create table process_tracker.extract_dependency
253266(
254267 parent_extract_id int not null ,
255268 child_extract_id int not null ,
269+ dependency_type_id int default 1 not null ,
256270 created_date_time timestamp default CURRENT_TIMESTAMP not null ,
257271 created_by int default 0 not null ,
258272 update_date_time timestamp default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP not null ,
@@ -261,7 +275,9 @@ create table process_tracker.extract_dependency
261275 constraint extract_dependency_fk01
262276 foreign key (parent_extract_id) references extract_tracking (extract_id),
263277 constraint extract_dependency_fk02
264- foreign key (child_extract_id) references extract_tracking (extract_id)
278+ foreign key (child_extract_id) references extract_tracking (extract_id),
279+ constraint extract_dependency_fk03
280+ foreign key (dependency_type_id) references dependency_type_lkup (dependency_type_id)
265281)
266282comment ' Table tracking interdependencies between extract files.' ;
267283
@@ -373,6 +389,7 @@ create table process_dependency
373389(
374390 parent_process_id int not null ,
375391 child_process_id int not null ,
392+ dependency_type_id int default 1 not null ,
376393 created_date_time timestamp default CURRENT_TIMESTAMP not null ,
377394 created_by int default 0 not null ,
378395 update_date_time timestamp default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP not null ,
@@ -381,7 +398,9 @@ create table process_dependency
381398 constraint process_dependency_ibfk_1
382399 foreign key (parent_process_id) references process (process_id),
383400 constraint process_dependency_ibfk_2
384- foreign key (child_process_id) references process (process_id)
401+ foreign key (child_process_id) references process (process_id),
402+ constraint process_dependency_fk03
403+ foreign key (dependency_type_id) references dependency_type_lkup (dependency_type_id)
385404);
386405
387406create index child_process_id
0 commit comments