[PATCH] Nachtrag Pos. 20: update script for oracle database

Wald Commits scm-commit at wald.intevation.org
Mon Nov 11 16:36:33 CET 2019


# HG changeset patch
# User mschaefer
# Date 1573486556 -3600
#      Mon Nov 11 16:35:56 2019 +0100
# Node ID eb32f75c65c3c24dd9f33f15f35dbe9e963aa18b
# Parent  ac41551a8e4d82d10981ef32c50f02016da3a9b7
Nachtrag Pos. 20: update script for oracle database

diff -r ac41551a8e4d -r eb32f75c65c3 backend/doc/schema/oracle_migrations/update_nachtrag_20.sql
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backend/doc/schema/oracle_migrations/update_nachtrag_20.sql	Mon Nov 11 16:35:56 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;


More information about the Dive4Elements-commits mailing list