From f8fceb253de4dce541f9c055a96329b6dfb9a005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 26 Oct 2019 14:47:17 +0300 Subject: [PATCH] add init.sql --- MTM/task4-straipsnis/init.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 MTM/task4-straipsnis/init.sql diff --git a/MTM/task4-straipsnis/init.sql b/MTM/task4-straipsnis/init.sql new file mode 100644 index 0000000..f2535b4 --- /dev/null +++ b/MTM/task4-straipsnis/init.sql @@ -0,0 +1,15 @@ +CREATE TABLE airports ( + gid SERIAL NOT NULL PRIMARY KEY, + name TEXT, + city TEXT, + country TEXT, + iata TEXT, + icao TEXT, + geom GEOMETRY, + latitude DOUBLE, + longitude DOUBLE, + altitude DOUBLE, + CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(geom) = 2), + CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'POINT'::text OR geom IS NULL), + CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4326) +);