diff backend/doc/schema/postgresql-sinfo-uinfo.sql @ 9038:4c5eeaff554c

Database column "comment" renamed to "notes" (restrictions in Oracle)
author mschaefer
date Wed, 02 May 2018 06:56:21 +0200
parents 1f63e9d3b0ec
children 361de818f76e
line wrap: on
line diff
--- a/backend/doc/schema/postgresql-sinfo-uinfo.sql	Mon Apr 30 18:06:31 2018 +0200
+++ b/backend/doc/schema/postgresql-sinfo-uinfo.sql	Wed May 02 06:56:21 2018 +0200
@@ -11,9 +11,9 @@
 
 ALTER TABLE bed_height
   ADD sounding_width_info VARCHAR(256),
-  ADD "comment" VARCHAR(256);
+  ADD notes VARCHAR(256);
 COMMENT ON COLUMN bed_height.sounding_width_info IS 'File header line info "ausgewertete Peilbreite"' ;
-COMMENT ON COLUMN bed_height."comment" IS 'File header line info "weitere Bemerkungen"' ;
+COMMENT ON COLUMN bed_height.notes IS 'File header line info "weitere Bemerkungen"' ;
 
 
 --Add new columns bed_height_values.min_height (Talweg) and bed_height_values.max_height (Kammlage) (same type as existing height column)
@@ -52,12 +52,12 @@
     river_id  integer NOT NULL CONSTRAINT cBedMobilityRivers REFERENCES rivers(id) ON DELETE CASCADE,
     kmrange_info  VARCHAR(32),
     filename  VARCHAR(256) NOT NULL,
-    "comment"  VARCHAR(256)
+    notes  VARCHAR(256)
 );
 COMMENT ON TABLE bed_mobility IS 'Longitudinal section of the bed mobility of a river' ;
 COMMENT ON COLUMN bed_mobility.kmrange_info IS 'File header line info "Strecke"' ;
 COMMENT ON COLUMN bed_mobility.filename IS 'Name without type extension of the imported file' ;
-COMMENT ON COLUMN bed_mobility."comment" IS 'File header line info "weitere Bemerkungen"' ;
+COMMENT ON COLUMN bed_mobility.notes IS 'File header line info "weitere Bemerkungen"' ;
 
 CREATE SEQUENCE BED_MOBILITY_ID_SEQ ;
 
@@ -86,7 +86,7 @@
     evaluation_by  VARCHAR(256),
     kmrange_info  VARCHAR(32),
     filename  VARCHAR(256) NOT NULL,
-    "comment"  VARCHAR(256)
+    notes  VARCHAR(256)
 );
 COMMENT ON TABLE infrastructure IS 'Longitudinal section of infrastructures of a river and a type' ;
 COMMENT ON COLUMN infrastructure.year IS 'File header line info "Stand"' ;
@@ -94,7 +94,7 @@
 COMMENT ON COLUMN infrastructure.evaluation_by IS 'File header line info "Auswerter"' ;
 COMMENT ON COLUMN infrastructure.kmrange_info IS 'File header line info "Strecke"' ;
 COMMENT ON COLUMN infrastructure.filename IS 'Name without type extension of the imported file' ;
-COMMENT ON COLUMN infrastructure."comment" IS 'File header line info "weitere Bemerkungen"' ;
+COMMENT ON COLUMN infrastructure.notes IS 'File header line info "weitere Bemerkungen"' ;
 
 CREATE SEQUENCE INFRASTRUCTURE_ID_SEQ ;
 
@@ -120,14 +120,14 @@
     river_id  integer NOT NULL CONSTRAINT cChannelRivers REFERENCES rivers(id) ON DELETE CASCADE,
     kmrange_info  VARCHAR(32),
     filename  VARCHAR(256) NOT NULL,
-    "comment"  VARCHAR(256),
+    notes  VARCHAR(256),
     year_from  NUMERIC(4,0),
     year_to  NUMERIC(4,0)
 );
 COMMENT ON TABLE channel IS 'Longitudinal section of the navigable channel of a river' ;
 COMMENT ON COLUMN channel.kmrange_info IS 'File header line info "Strecke"' ;
 COMMENT ON COLUMN channel.filename IS 'Name without type extension of the imported file' ;
-COMMENT ON COLUMN channel."comment" IS 'File header line info "weitere Bemerkungen"' ;
+COMMENT ON COLUMN channel.notes IS 'File header line info "weitere Bemerkungen"' ;
 COMMENT ON COLUMN channel.year_from IS 'Start year of the period for which the channel values are valid, NULL when valid for the whole past';
 COMMENT ON COLUMN channel.year_to IS 'End year of the period for which the channel values are valid, NULL when unlimited';
 
@@ -168,13 +168,13 @@
     year  NUMERIC(4,0) NOT NULL,
     kmrange_info  VARCHAR(32),
     filename  VARCHAR(256) NOT NULL,
-    "comment"  VARCHAR(256)
+    notes  VARCHAR(256)
 );
 COMMENT ON TABLE collision IS 'Longitudinal section of ship collisions with the river bed' ;
 COMMENT ON COLUMN collision.year IS 'File header line info "Jahr"' ;
 COMMENT ON COLUMN collision.kmrange_info IS 'File header line info "Strecke"' ;
 COMMENT ON COLUMN collision.filename IS 'Name without type extension of the imported file' ;
-COMMENT ON COLUMN collision."comment" IS 'File header line info "weitere Bemerkungen"' ;
+COMMENT ON COLUMN collision.notes IS 'File header line info "weitere Bemerkungen"' ;
 
 CREATE SEQUENCE COLLISION_ID_SEQ ;
 
@@ -208,7 +208,7 @@
     groupname  VARCHAR(32) NOT NULL CHECK(groupname IN ('messung','berechnung')),
     sounding_info  VARCHAR(64),
     evaluation_by  VARCHAR(256),
-    "comment"  VARCHAR(256)
+    notes  VARCHAR(256)
 );
 COMMENT ON TABLE tkh IS 'Longitudinal section of computed Transportkörperhöhe of a river' ;
 COMMENT ON COLUMN tkh.day IS 'File header line info "Datum"' ;
@@ -217,7 +217,7 @@
 COMMENT ON COLUMN tkh.groupname IS 'Group the file belongs to' ;
 COMMENT ON COLUMN tkh.sounding_info IS 'File header line info "Peilung"' ;
 COMMENT ON COLUMN tkh.evaluation_by IS 'File header line info "Auswerter"' ;
-COMMENT ON COLUMN tkh."comment" IS 'File header line info "weitere Bemerkungen"' ;
+COMMENT ON COLUMN tkh.notes IS 'File header line info "weitere Bemerkungen"' ;
 
 CREATE SEQUENCE TKH_ID_SEQ ;
 
@@ -256,7 +256,7 @@
     filename  VARCHAR(256) NOT NULL,
     sounding_info  VARCHAR(64),
     evaluation_by  VARCHAR(255),
-    "comment"  VARCHAR(256)
+    notes  VARCHAR(256)
 );
 
 COMMENT ON TABLE flow_depth IS 'Longitudinal section of computed flow depth of a river' ;
@@ -265,7 +265,7 @@
 COMMENT ON COLUMN flow_depth.filename IS 'Name without type extension of the imported file' ;
 COMMENT ON COLUMN flow_depth.sounding_info IS 'File header line info "Peilung"' ;
 COMMENT ON COLUMN flow_depth.evaluation_by IS 'File header line info "Auswerter"' ;
-COMMENT ON COLUMN flow_depth."comment" IS 'File header line info "weitere Bemerkungen"' ;
+COMMENT ON COLUMN flow_depth.notes IS 'File header line info "weitere Bemerkungen"' ;
 
 CREATE SEQUENCE FLOW_DEPTH_ID_SEQ ;
 
@@ -310,7 +310,7 @@
     old_glw  VARCHAR(64) NOT NULL,
     filename  VARCHAR(256) NOT NULL,
     groupname  VARCHAR(32) NOT NULL CHECK(groupname IN ('aktuell','etappe')),
-    "comment"  VARCHAR(256)
+    notes  VARCHAR(256)
 );
 COMMENT ON TABLE depth_evolution IS 'Longitudinal section of the evolution of the flow depth of a river' ;
 COMMENT ON COLUMN depth_evolution.reference_year IS 'File header line info "Bezugsjahr" (GlW)' ;
@@ -322,7 +322,7 @@
 COMMENT ON COLUMN depth_evolution.old_glw IS 'File header line info "Historische Wasserspiegellage"' ;
 COMMENT ON COLUMN depth_evolution.filename IS 'Name without type extension of the imported file' ;
 COMMENT ON COLUMN depth_evolution.groupname IS 'Group the file belongs to' ;
-COMMENT ON COLUMN depth_evolution."comment" IS 'File header line info "weitere Bemerkungen"' ;
+COMMENT ON COLUMN depth_evolution.notes IS 'File header line info "weitere Bemerkungen"' ;
 
 CREATE SEQUENCE DEPTH_EVOLUTION_ID_SEQ ;
 
@@ -378,14 +378,14 @@
     evaluation_by  VARCHAR(255),
     kmrange_info  VARCHAR(32),
     filename  VARCHAR(256) NOT NULL,
-    "comment"  VARCHAR(256)
+    notes  VARCHAR(256)
 );
 
 COMMENT ON TABLE salix IS 'Longitudinal section of the salix line parameters of a river' ;
 COMMENT ON COLUMN salix.evaluation_by IS 'File header line info "Auswerter"' ;
 COMMENT ON COLUMN salix.kmrange_info IS 'File header line info "Strecke"' ;
 COMMENT ON COLUMN salix.filename IS 'Name without type extension of the imported file' ;
-COMMENT ON COLUMN salix."comment" IS 'File header line info "weitere Bemerkungen"' ;
+COMMENT ON COLUMN salix.notes IS 'File header line info "weitere Bemerkungen"' ;
 
 CREATE SEQUENCE SALIX_ID_SEQ ;
 
@@ -441,13 +441,13 @@
     river_id  integer NOT NULL CONSTRAINT cVegetationRivers REFERENCES rivers(id) ON DELETE CASCADE,
     name  VARCHAR(256),
     filename  VARCHAR(256) NOT NULL,
-    "comment"  VARCHAR(256)
+    notes  VARCHAR(256)
 );
 
 COMMENT ON TABLE vegetation IS 'Classification of the vegetation of a river' ;
 COMMENT ON COLUMN vegetation.name IS 'File header line info "Einteilung"' ;
 COMMENT ON COLUMN vegetation.filename IS 'Name without type extension of the imported file' ;
-COMMENT ON COLUMN vegetation."comment" IS 'File header line info "weitere Bemerkungen"' ;
+COMMENT ON COLUMN vegetation.notes IS 'File header line info "weitere Bemerkungen"' ;
 
 CREATE SEQUENCE VEGETATION_ID_SEQ ;
 

http://dive4elements.wald.intevation.org