diff backend/doc/schema/oracle_migrations/update_nachtrag_20.sql @ 9639:df668014016e

Merge
author dnt_bjoernsen <d.tironi@bjoernsen.de>
date Tue, 12 Nov 2019 09:24:07 +0100
parents eb32f75c65c3
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backend/doc/schema/oracle_migrations/update_nachtrag_20.sql	Tue Nov 12 09:24:07 2019 +0100
@@ -0,0 +1,16 @@
+--Neues Feld infrastructure.group_id
+
+SET AUTOCOMMIT ON;
+
+ALTER TABLE infrastructure ADD (group_id NUMBER(38,0));
+
+UPDATE infrastructure SET group_id=annotation_type_id;
+
+ALTER TABLE infrastructure MODIFY (group_id NOT NULL);
+
+ALTER TABLE infrastructure ADD CONSTRAINT cInfrastructureGroupAnnoType
+      FOREIGN KEY (group_id) REFERENCES annotation_types;
+
+COMMENT ON COLUMN infrastructure.group_id IS 'Reference to the infrastructure type group';
+
+COMMIT;

http://dive4elements.wald.intevation.org