comparison backend/doc/schema/postgresql-minfo.sql @ 8032:fd3a24336e6a

SCHEMA CHANGE and Importer (only longitudinal section data so far): only grain fractions given now in schema are valid. We are handling sediment loads, not yields.
author "Tom Gottfried <tom@intevation.de>"
date Mon, 14 Jul 2014 15:36:44 +0200
parents aa8dcf7331a8
children bde5f5ec7c72
comparison
equal deleted inserted replaced
8031:6954ac9b7591 8032:fd3a24336e6a
241 CREATE TABLE grain_fraction ( 241 CREATE TABLE grain_fraction (
242 id int NOT NULL, 242 id int NOT NULL,
243 name VARCHAR(64) NOT NULL, 243 name VARCHAR(64) NOT NULL,
244 lower NUMERIC, 244 lower NUMERIC,
245 upper NUMERIC, 245 upper NUMERIC,
246 PRIMARY KEY (id) 246 PRIMARY KEY (id),
247 ); 247 UNIQUE(name, lower, upper)
248 );
249 -- single fractions
250 INSERT INTO grain_fraction VALUES (1, 'coarse', 16, 200);
251 INSERT INTO grain_fraction VALUES (2, 'fine_middle', 2, 16);
252 INSERT INTO grain_fraction VALUES (3, 'sand', 0.063, 2);
253 INSERT INTO grain_fraction VALUES (4, 'susp_sand', 0.063, 2);
254 INSERT INTO grain_fraction VALUES (5, 'susp_sand_bed', 0.063, 2);
255 INSERT INTO grain_fraction VALUES (6, 'suspended_sediment', 0, 0.063);
256 -- aggregations of fractions
257 INSERT INTO grain_fraction VALUES (7, 'total', 0, 200);
258 INSERT INTO grain_fraction VALUES (8, 'bed_load', 0.063, 200);
259 INSERT INTO grain_fraction VALUES (9, 'suspended_load', 0, 2);
248 260
249 261
250 --lookup table for sediment yield kinds 262 --lookup table for sediment yield kinds
251 CREATE TABLE sediment_yield_kinds ( 263 CREATE TABLE sediment_yield_kinds (
252 id int PRIMARY KEY NOT NULL, 264 id int PRIMARY KEY NOT NULL,

http://dive4elements.wald.intevation.org