diff --git a/scripts/create_osm_roads.sh b/scripts/create_osm_roads.sh index ad48fe6..ca66ca2 100755 --- a/scripts/create_osm_roads.sh +++ b/scripts/create_osm_roads.sh @@ -38,7 +38,7 @@ psql -h $HOST_DB_osm -U osmbr -d osm -c "DROP TABLE IF EXISTS osm_roads ;" psql -h $HOST_DB_osm -U osmbr -d osm -c " CREATE TABLE osm_roads ( - uid bigint, + uid bigint NOT NULL, osm_id bigint, highway text, type text, diff --git a/scripts/create_tables.sql b/scripts/create_tables.sql index 2024460..043982c 100644 --- a/scripts/create_tables.sql +++ b/scripts/create_tables.sql @@ -199,7 +199,7 @@ ALTER TABLE phase_2_pk_secteur_4326 OWNER to redadeg; DROP TABLE IF EXISTS osm_roads ; CREATE TABLE osm_roads ( - id bigint, + uid bigint NOT NULL, osm_id bigint, highway text, type text, @@ -208,7 +208,7 @@ CREATE TABLE osm_roads name_fr text, name_br text, the_geom geometry, - CONSTRAINT osm_roads_pkey PRIMARY KEY (id), + CONSTRAINT osm_roads_pkey PRIMARY KEY (uid), CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR geometrytype(the_geom) = 'MULTILINESTRING'::text), CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) );