add init.sql
This commit is contained in:
parent
1367c35a31
commit
f8fceb253d
15
MTM/task4-straipsnis/init.sql
Normal file
15
MTM/task4-straipsnis/init.sql
Normal file
@ -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)
|
||||
);
|
Loading…
Reference in New Issue
Block a user