Skip to content

Commit e66fd8f

Browse files
author
Alex Meadows
committed
process_tracker_python-102 Add relationship to extract and extract location
🐛 Forgot to update dbscripts for new tables Closes #102
1 parent 1973d18 commit e66fd8f

File tree

2 files changed

+102
-1
lines changed

2 files changed

+102
-1
lines changed

dbscripts/mysql_process_tracker.sql

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,5 +569,49 @@ create table process_filter
569569
foreign key (filter_type_id) references filter_type_lkup (filter_type_id)
570570
);
571571

572+
create table process_tracker.extract_source
573+
(
574+
extract_id int not null,
575+
source_id int not null,
576+
primary key (extract_id, source_id),
577+
constraint extract_source_fk01
578+
foreign key (extract_id) references process_tracker.extract_tracking (extract_id),
579+
constraint extract_source_fk02
580+
foreign key (source_id) references process_tracker.source_lkup (source_id)
581+
);
582+
583+
create table process_tracker.extract_source_object
584+
(
585+
extract_id int not null,
586+
source_object_id int not null,
587+
primary key (extract_id, source_object_id),
588+
constraint extract_source_object_fk01
589+
foreign key (extract_id) references process_tracker.extract_tracking (extract_id),
590+
constraint extract_source_object_fk02
591+
foreign key (source_object_id) references process_tracker.source_object_lkup (source_object_id)
592+
);
593+
594+
create table process_tracker.source_location
595+
(
596+
source_id int not null,
597+
location_id int not null,
598+
primary key (source_id, location_id),
599+
constraint source_location_fk01
600+
foreign key (source_id) references process_tracker.source_lkup (source_id),
601+
constraint source_location_fk02
602+
foreign key (location_id) references process_tracker.location_lkup (location_id)
603+
);
604+
605+
create table process_tracker.source_object_location
606+
(
607+
source_object_id int not null,
608+
location_id int not null,
609+
primary key (source_object_id, location_id),
610+
constraint source_object_location_fk01
611+
foreign key (source_object_id) references process_tracker.source_object_lkup (source_object_id),
612+
constraint source_object_location_fk02
613+
foreign key (location_id) references process_tracker.location_lkup (location_id)
614+
);
615+
572616

573617

dbscripts/postgresql_process_tracker.sql

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,4 +808,61 @@ create table process_tracker.process_filter
808808
alter table process_tracker.process_filter owner to pt_admin;
809809

810810
create unique index process_filter_udx01
811-
on process_tracker.process_filter (process_id, source_object_attribute_id, filter_type_id);
811+
on process_tracker.process_filter (process_id, source_object_attribute_id, filter_type_id);
812+
813+
create table process_tracker.extract_source
814+
(
815+
extract_id integer not null
816+
constraint extract_source_fk02
817+
references process_tracker.extract_tracking,
818+
source_id integer not null
819+
constraint extract_source_fk01
820+
references process_tracker.source_lkup,
821+
constraint extract_source_pk
822+
primary key (extract_id, source_id)
823+
);
824+
825+
alter table process_tracker.extract_source owner to pt_admin;
826+
827+
create table process_tracker.extract_source_object
828+
(
829+
extract_id integer not null
830+
constraint extract_source_object_fk01
831+
references process_tracker.extract_tracking,
832+
source_object_id integer not null
833+
constraint extract_source_object_fk02
834+
references process_tracker.source_object_lkup,
835+
constraint extract_source_object_pk
836+
primary key (extract_id, source_object_id)
837+
);
838+
839+
alter table process_tracker.extract_source_object owner to pt_admin;
840+
841+
create table process_tracker.source_object_location
842+
(
843+
source_object_id integer not null
844+
constraint source_object_location_fk01
845+
references process_tracker.source_object_lkup,
846+
location_id integer not null
847+
constraint source_object_location_fk02
848+
references process_tracker.location_lkup,
849+
constraint source_object_location_pk
850+
primary key (source_object_id, location_id)
851+
);
852+
853+
alter table process_tracker.source_object_location owner to pt_admin;
854+
855+
create table process_tracker.source_location
856+
(
857+
source_id integer not null
858+
constraint source_location_fk01
859+
references process_tracker.source_lkup,
860+
location_id integer not null
861+
constraint source_location_fk02
862+
references process_tracker.location_lkup,
863+
constraint source_location_pk
864+
primary key (source_id, location_id)
865+
);
866+
867+
alter table process_tracker.source_location owner to pt_admin;
868+

0 commit comments

Comments
 (0)