Mercurial > dive4elements > river
comparison backend/doc/schema/postgresql-sinfo-uinfo.sql @ 9401:361de818f76e
Added color fields to the vegetation zone database table and importer, max days field changed from exclusive to inclusive
author | mschaefer |
---|---|
date | Tue, 14 Aug 2018 14:02:26 +0200 |
parents | 4c5eeaff554c |
children | 69a7edd7d1e1 |
comparison
equal
deleted
inserted
replaced
9400:8e100593aec3 | 9401:361de818f76e |
---|---|
455 CREATE TABLE vegetation_zone ( | 455 CREATE TABLE vegetation_zone ( |
456 id NUMERIC(9,0) PRIMARY KEY, | 456 id NUMERIC(9,0) PRIMARY KEY, |
457 vegetation_id NUMERIC(9,0) NOT NULL CONSTRAINT cVegetationZoneVegetation REFERENCES vegetation(id) ON DELETE CASCADE, | 457 vegetation_id NUMERIC(9,0) NOT NULL CONSTRAINT cVegetationZoneVegetation REFERENCES vegetation(id) ON DELETE CASCADE, |
458 vegetation_type_id NUMERIC(9,0) NOT NULL CONSTRAINT cVegetationZoneVegetationType REFERENCES vegetation_type(id) ON DELETE CASCADE, | 458 vegetation_type_id NUMERIC(9,0) NOT NULL CONSTRAINT cVegetationZoneVegetationType REFERENCES vegetation_type(id) ON DELETE CASCADE, |
459 min_overflow_days NUMERIC(3,0) NOT NULL, | 459 min_overflow_days NUMERIC(3,0) NOT NULL, |
460 max_overflow_days NUMERIC(3,0) NOT NULL | 460 max_overflow_days NUMERIC(3,0) NOT NULL, |
461 color_r NUMERIC(3,0) NOT NULL, | |
462 color_g NUMERIC(3,0) NOT NULL, | |
463 color_b NUMERIC(3,0) NOT NULL | |
461 ); | 464 ); |
462 | 465 |
463 COMMENT ON TABLE vegetation_zone IS 'Vegetation zone of a river station' ; | 466 COMMENT ON TABLE vegetation_zone IS 'Vegetation zone of a river station' ; |
464 COMMENT ON COLUMN vegetation_zone.min_overflow_days IS 'Minimum number (inclusive) of overflow days in a year for the zone type' ; | 467 COMMENT ON COLUMN vegetation_zone.min_overflow_days IS 'Minimum number (inclusive) of overflow days in a year for the zone type' ; |
465 COMMENT ON COLUMN vegetation_zone.max_overflow_days IS 'Maximum number (exclusive) of overflow days in a year for the zone type' ; | 468 COMMENT ON COLUMN vegetation_zone.max_overflow_days IS 'Maximum number (inclusive) of overflow days in a year for the zone type' ; |
469 COMMENT ON COLUMN vegetation_zone.color_r IS 'Red value (0-255) of the zone color' ; | |
470 COMMENT ON COLUMN vegetation_zone.color_g IS 'Green value (0-255) of the zone color' ; | |
471 COMMENT ON COLUMN vegetation_zone.color_b IS 'Blue value (0-255) of the zone color' ; | |
466 | 472 |
467 CREATE SEQUENCE VEGETATION_ZONE_ID_SEQ ; | 473 CREATE SEQUENCE VEGETATION_ZONE_ID_SEQ ; |
468 | 474 |
469 | 475 |
470 COMMIT; | 476 COMMIT; |