This repository has been archived by the owner on Nov 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kv1_ARR.sql
22 lines (19 loc) · 1.21 KB
/
kv1_ARR.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
alter table pool drop constraint pool_dataownercode_fkey;
alter table link drop constraint link_pkey;
alter table link add constraint link_pkey PRIMARY KEY ("version", "dataownercode", "userstopcodebegin", "userstopcodeend", "validfrom");
alter table pool add constraint pool_dataownercode_fkey FOREIGN KEY (Version, DataOwnerCode, UserStopCodeBegin, UserStopCodeEnd, LinkValidFrom) REFERENCES
link (Version, DataOwnerCode, UserStopCodeBegin, UserStopCodeEnd, ValidFrom);
alter table pool drop constraint pool_dataownercode_fkey;
alter table pool drop constraint pool_pkey;
alter table pool add constraint pool_pkey PRIMARY KEY (Version, DataOwnerCode, UserStopCodeBegin, UserStopCodeEnd, LinkValidFrom, PointDataOwnerCode,
PointCode);
alter table link drop column transporttype;
alter table pool drop column transporttype;
-- For KV1 supplied to GOVI
--alter table pujopass drop column wheelchairaccessible;
--alter table pujopass drop column dataownerisoperator;
--alter table jopatili drop column productformulatype;
--alter table dest drop column relevantdestnamedetail;
--alter table line drop column transporttype;
--alter table usrstop drop column userstoptype;
--alter table jopatili drop constraint jopatili_dataownercode_fkey;