stud/MTM/task4-straipsnis/schema.sql

16 lines
474 B
MySQL
Raw Normal View History

2019-10-26 14:47:17 +03:00
CREATE TABLE airports (
gid SERIAL NOT NULL PRIMARY KEY,
name TEXT,
city TEXT,
country TEXT,
iata TEXT,
icao TEXT,
geom GEOMETRY,
2019-10-26 14:50:01 +03:00
latitude DOUBLE PRECISION,
longitude DOUBLE PRECISION,
altitude DOUBLE PRECISION,
CONSTRAINT enforce_dims_geom CHECK (st_ndims(geom) = 2),
2019-10-26 14:47:17 +03:00
CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'POINT'::text OR geom IS NULL),
2019-10-26 14:50:01 +03:00
CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 4326)
2019-10-26 14:47:17 +03:00
);