Skip to content

Commit d9ffb57

Browse files
author
Alex Meadows
committed
process_tracker_python-83 Add extract file type and compression type
🐛 Fixing issues with SQL scripts
1 parent ecaa4a1 commit d9ffb57

File tree

2 files changed

+28
-30
lines changed

2 files changed

+28
-30
lines changed

dbscripts/mysql_process_tracker.sql

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -144,28 +144,6 @@ create table source_lkup
144144
unique (source_name)
145145
);
146146

147-
create table source_contact
148-
(
149-
source_id int not null,
150-
contact_id int not null,
151-
primary key (source_id, contact_id),
152-
constraint source_contact_fk01
153-
foreign key (source_id) references source_lkup (source_id),
154-
constraint source_contact_fk02
155-
foreign key (contact_id) references contact_lkup (contact_id)
156-
);
157-
158-
create table process_contact
159-
(
160-
process_id int not null,
161-
contact_id int not null,
162-
primary key (process_id, contact_id),
163-
constraint process_contact_fk01
164-
foreign key (process_id) references process (process_id),
165-
constraint process_contact_fk02
166-
foreign key (contact_id) references contact_lkup (contact_id)
167-
);
168-
169147
create table system_lkup
170148
(
171149
system_id int auto_increment
@@ -439,5 +417,25 @@ create table process_dataset_type
439417
)
440418
comment 'Relationship between process and dataset type category';
441419

420+
create table source_contact
421+
(
422+
source_id int not null,
423+
contact_id int not null,
424+
primary key (source_id, contact_id),
425+
constraint source_contact_fk01
426+
foreign key (source_id) references source_lkup (source_id),
427+
constraint source_contact_fk02
428+
foreign key (contact_id) references contact_lkup (contact_id)
429+
);
442430

431+
create table process_contact
432+
(
433+
process_id int not null,
434+
contact_id int not null,
435+
primary key (process_id, contact_id),
436+
constraint process_contact_fk01
437+
foreign key (process_id) references process (process_id),
438+
constraint process_contact_fk02
439+
foreign key (contact_id) references contact_lkup (contact_id)
440+
);
443441

dbscripts/postgresql_process_tracker.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,33 +108,33 @@ alter table source_lkup owner to pt_admin;
108108
create unique index source_lkup_udx01
109109
on source_lkup (source_name);
110110

111-
create table process_tracker.source_contact
111+
create table source_contact
112112
(
113113
source_id integer not null
114114
constraint source_contact_fk01
115-
references process_tracker.source_lkup,
115+
references source_lkup,
116116
contact_id integer not null
117117
constraint source_contact_fk02
118-
references process_tracker.contact_lkup,
118+
references contact_lkup,
119119
constraint source_contact_pk
120120
primary key (source_id, contact_id)
121121
);
122122

123-
alter table process_tracker.source_contact owner to pt_admin;
123+
alter table source_contact owner to pt_admin;
124124

125-
create table process_tracker.process_contact
125+
create table process_contact
126126
(
127127
process_id integer not null
128128
constraint process_contact_fk01
129-
references process_tracker.process,
129+
references process,
130130
contact_id integer not null
131131
constraint process_contact_fk02
132-
references process_tracker.contact_lkup,
132+
references contact_lkup,
133133
constraint process_contact_pk
134134
primary key (process_id, contact_id)
135135
);
136136

137-
alter table process_tracker.process_contact owner to pt_admin;
137+
alter table process_contact owner to pt_admin;
138138

139139
create table process_status_lkup
140140
(

0 commit comments

Comments
 (0)