# HG changeset patch # User Andre Heinecke # Date 1359393841 -3600 # Node ID f5c55d7ea07e7936121fe92638c450b017bcfd8a # Parent 28f992c0f9370335ced61d8a358fab6376c1db8a SCHEMA Change (psql only) use FLOAT8 for real numbers In oracle they are numbers with precision so there is no change necessary there. diff -r 28f992c0f937 -r f5c55d7ea07e flys-backend/doc/schema/postgresql-spatial.sql --- a/flys-backend/doc/schema/postgresql-spatial.sql Mon Jan 28 17:42:18 2013 +0100 +++ b/flys-backend/doc/schema/postgresql-spatial.sql Mon Jan 28 18:24:01 2013 +0100 @@ -19,7 +19,7 @@ CREATE TABLE river_axes_km ( id int PRIMARY KEY NOT NULL, river_id int REFERENCES rivers(id), - km NUMERIC NOT NULL, + km FLOAT8 NOT NULL, name VARCHAR(64), path VARCHAR(256) ); @@ -32,8 +32,8 @@ CREATE TABLE cross_section_tracks ( id int PRIMARY KEY NOT NULL, river_id int REFERENCES rivers(id), - km NUMERIC NOT NULL, - z NUMERIC NOT NULL DEFAULT 0, + km FLOAT8 NOT NULL, + z FLOAT8 NOT NULL DEFAULT 0, name VARCHAR(64), path VARCHAR(256) ); @@ -47,7 +47,7 @@ id int PRIMARY KEY NOT NULL, river_id int REFERENCES rivers(id), kind VARCHAR(16) NOT NULL, - z NUMERIC DEFAULT 0, + z FLOAT8 DEFAULT 0, name VARCHAR(64), path VARCHAR(256) ); @@ -75,9 +75,9 @@ CREATE TABLE fixpoints ( id int PRIMARY KEY NOT NULL, river_id int REFERENCES rivers(id), - x int, - y int, - km NUMERIC NOT NULL, + x FLOAT8, + y FLOAT8, + km FLOAT8 NOT NULL, HPGP VARCHAR(2), name VARCHAR(64), path VARCHAR(256) @@ -105,8 +105,8 @@ river_id int REFERENCES rivers(id), -- XXX Should we use the ranges table instead? name VARCHAR(64), - lower NUMERIC, - upper NUMERIC, + lower FLOAT8, + upper FLOAT8, year_from VARCHAR(32) NOT NULL, year_to VARCHAR(32) NOT NULL, projection VARCHAR(32) NOT NULL, @@ -125,7 +125,7 @@ CREATE TABLE catchment ( id int PRIMARY KEY NOT NULL, river_id int REFERENCES rivers(id), - area NUMERIC, + area FLOAT8, name VARCHAR(256), path VARCHAR(256) ); @@ -230,10 +230,10 @@ river_id int REFERENCES rivers(id), name varchar(64) NOT NULL, kind int NOT NULL, - diff real, + diff FLOAT8, count int, - area real, - perimeter real, + area FLOAT8, + perimeter FLOAT8, path VARCHAR(256) ); SELECT AddGeometryColumn('floodmaps', 'geom', 31467, 'MULTIPOLYGON', 2);