annotate backend/doc/schema/oracle_migrations/update_nachtrag_20.sql @ 9700:b2768f367dff

handler for wms theme legend
author dnt_bjoernsen <d.tironi@bjoernsen.de>
date Wed, 20 Jan 2021 19:06:57 +0100
parents eb32f75c65c3
children
rev   line source
9637
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
1 --Neues Feld infrastructure.group_id
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
2
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
3 SET AUTOCOMMIT ON;
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
4
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
5 ALTER TABLE infrastructure ADD (group_id NUMBER(38,0));
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
6
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
7 UPDATE infrastructure SET group_id=annotation_type_id;
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
8
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
9 ALTER TABLE infrastructure MODIFY (group_id NOT NULL);
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
10
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
11 ALTER TABLE infrastructure ADD CONSTRAINT cInfrastructureGroupAnnoType
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
12 FOREIGN KEY (group_id) REFERENCES annotation_types;
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
13
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
14 COMMENT ON COLUMN infrastructure.group_id IS 'Reference to the infrastructure type group';
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
15
eb32f75c65c3 Nachtrag Pos. 20: update script for oracle database
mschaefer
parents:
diff changeset
16 COMMIT;

http://dive4elements.wald.intevation.org