Skip to content

Commit 0551f51

Browse files
authored
Mark geometry columns as non-null for import (#695)
See https://github.com/hiddewie/OpenRailwayMap-vector/actions/runs/19800992241/job/56728231479 Update is failing because of missing geometries during import. Possibly due to faulty update.
1 parent 917f4bc commit 0551f51

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

import/openrailwaymap.lua

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ local railway_line = osm2pgsql.define_table({
166166
ids = { type = 'way', id_column = 'osm_id' },
167167
columns = {
168168
{ column = 'id', sql_type = 'serial', create_only = true },
169-
{ column = 'way', type = 'linestring' },
169+
{ column = 'way', type = 'linestring', not_null = true },
170170
{ column = 'way_length', type = 'real' },
171171
{ column = 'feature', type = 'text' },
172172
{ column = 'state', type = 'text' },
@@ -217,7 +217,7 @@ local pois = osm2pgsql.define_table({
217217
ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' },
218218
columns = {
219219
{ column = 'id', sql_type = 'serial', create_only = true },
220-
{ column = 'way', type = 'point' },
220+
{ column = 'way', type = 'point', not_null = true },
221221
{ column = 'feature', type = 'text' },
222222
{ column = 'rank', type = 'integer' },
223223
{ column = 'minzoom', type = 'integer' },
@@ -241,7 +241,7 @@ local stations = osm2pgsql.define_table({
241241
ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' },
242242
columns = {
243243
{ column = 'id', sql_type = 'serial', create_only = true },
244-
{ column = 'way', type = 'geometry' },
244+
{ column = 'way', type = 'geometry', not_null = true },
245245
{ column = 'feature', type = 'text' },
246246
{ column = 'state', type = 'text' },
247247
{ column = 'name', type = 'text' },
@@ -278,7 +278,7 @@ local stop_positions = osm2pgsql.define_table({
278278
ids = { type = 'node', id_column = 'osm_id' },
279279
columns = {
280280
{ column = 'id', sql_type = 'serial', create_only = true },
281-
{ column = 'way', type = 'point' },
281+
{ column = 'way', type = 'point', not_null = true },
282282
{ column = 'name', type = 'text' },
283283
{ column = 'type', type = 'text' },
284284
},
@@ -289,7 +289,7 @@ local platforms = osm2pgsql.define_table({
289289
ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' },
290290
columns = {
291291
{ column = 'id', sql_type = 'serial', create_only = true },
292-
{ column = 'way', type = 'geometry' },
292+
{ column = 'way', type = 'geometry', not_null = true },
293293
{ column = 'name', type = 'text' },
294294
{ column = 'ref', sql_type = 'text[]' },
295295
{ column = 'height', type = 'real' },
@@ -310,7 +310,7 @@ local platform_edge = osm2pgsql.define_table({
310310
ids = { type = 'way', id_column = 'osm_id' },
311311
columns = {
312312
{ column = 'id', sql_type = 'serial', create_only = true },
313-
{ column = 'way', type = 'linestring' },
313+
{ column = 'way', type = 'linestring', not_null = true },
314314
{ column = 'ref', sql_type = 'text' },
315315
{ column = 'height', type = 'real' },
316316
{ column = 'tactile_paving', type = 'boolean' },
@@ -322,7 +322,7 @@ local station_entrances = osm2pgsql.define_table({
322322
ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' },
323323
columns = {
324324
{ column = 'id', sql_type = 'serial', create_only = true },
325-
{ column = 'way', type = 'point' },
325+
{ column = 'way', type = 'point', not_null = true },
326326
{ column = 'name', type = 'text' },
327327
{ column = 'type', type = 'text' },
328328
{ column = 'ref', type = 'text' },
@@ -339,7 +339,7 @@ local station_entrances = osm2pgsql.define_table({
339339

340340
local signal_columns = {
341341
{ column = 'id', sql_type = 'serial', create_only = true },
342-
{ column = 'way', type = 'point' },
342+
{ column = 'way', type = 'point', not_null = true },
343343
{ column = 'railway', type = 'text' },
344344
{ column = 'ref', type = 'text' },
345345
{ column = 'signal_direction', type = 'text' },
@@ -381,8 +381,8 @@ local boxes = osm2pgsql.define_table({
381381
ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' },
382382
columns = {
383383
{ column = 'id', sql_type = 'serial', create_only = true },
384-
{ column = 'way', type = 'geometry' },
385-
{ column = 'center', type = 'geometry' },
384+
{ column = 'way', type = 'geometry', not_null = true },
385+
{ column = 'center', type = 'geometry', not_null = true },
386386
{ column = 'way_area', type = 'real' },
387387
{ column = 'feature', type = 'text' },
388388
{ column = 'ref', type = 'text' },
@@ -405,7 +405,7 @@ local turntables = osm2pgsql.define_table({
405405
ids = { type = 'way', id_column = 'osm_id' },
406406
columns = {
407407
{ column = 'id', sql_type = 'serial', create_only = true },
408-
{ column = 'way', type = 'polygon' },
408+
{ column = 'way', type = 'polygon', not_null = true },
409409
{ column = 'feature', type = 'text' },
410410
},
411411
})
@@ -415,7 +415,7 @@ local railway_positions = osm2pgsql.define_table({
415415
ids = { type = 'node', id_column = 'osm_id' },
416416
columns = {
417417
{ column = 'id', sql_type = 'serial', create_only = true },
418-
{ column = 'way', type = 'point' },
418+
{ column = 'way', type = 'point', not_null = true },
419419
{ column = 'railway', type = 'text' },
420420
{ column = 'position_numeric', type = 'real' },
421421
{ column = 'position_text', type = 'text', not_null = true },
@@ -446,7 +446,7 @@ local catenary = osm2pgsql.define_table({
446446
ids = { type = 'any', id_column = 'osm_id', type_column = 'osm_type' },
447447
columns = {
448448
{ column = 'id', sql_type = 'serial', create_only = true },
449-
{ column = 'way', type = 'geometry' },
449+
{ column = 'way', type = 'geometry', not_null = true },
450450
{ column = 'feature', type = 'text' },
451451
{ column = 'ref', type = 'text' },
452452
{ column = 'transition', type = 'boolean' },
@@ -466,7 +466,7 @@ local railway_switches = osm2pgsql.define_table({
466466
ids = { type = 'node', id_column = 'osm_id' },
467467
columns = {
468468
{ column = 'id', sql_type = 'serial', create_only = true },
469-
{ column = 'way', type = 'point' },
469+
{ column = 'way', type = 'point', not_null = true },
470470
{ column = 'railway', type = 'text' },
471471
{ column = 'ref', type = 'text' },
472472
{ column = 'type', type = 'text' },
@@ -531,7 +531,7 @@ local landuse = osm2pgsql.define_table({
531531
ids = { type = 'way', id_column = 'osm_id' },
532532
columns = {
533533
{ column = 'id', sql_type = 'serial', create_only = true },
534-
{ column = 'way', type = 'polygon' },
534+
{ column = 'way', type = 'polygon', not_null = true },
535535
},
536536
})
537537

0 commit comments

Comments
 (0)