comparison schema/gemma.sql @ 135:731fb359b29c

Schema: Make responsibility_areas multi polygons. As responsibility_areas are based on country borders, and countries may consist of multiple polygons (think islands for example) we need to use MULTIPOLYGON as data type.
author Sascha Wilde <wilde@intevation.de>
date Fri, 29 Jun 2018 11:56:34 +0200
parents d349db18bece
children 4e2451d561b1
comparison
equal deleted inserted replaced
133:f4523620ba5d 135:731fb359b29c
58 -- factor when there are many FKs pointing here. 58 -- factor when there are many FKs pointing here.
59 ); 59 );
60 60
61 CREATE TABLE gemma.responsibility_areas ( 61 CREATE TABLE gemma.responsibility_areas (
62 country char(2) PRIMARY KEY REFERENCES countries, 62 country char(2) PRIMARY KEY REFERENCES countries,
63 area geometry(POLYGON, 4326) --XXX: Should be geography (elsewhere too) 63 area geometry(MULTIPOLYGON, 4326) --XXX: Should be geography (elsewhere too)
64 ); 64 );
65 65
66 CREATE TABLE gemma.language_codes ( 66 CREATE TABLE gemma.language_codes (
67 language_code varchar PRIMARY KEY 67 language_code varchar PRIMARY KEY
68 ); 68 );