You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: db/deploy/osm_pgosm_flex.sql
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ BEGIN;
5
5
CREATETABLEIF NOT EXISTS {schema_name}.pgosm_flex (
6
6
id BIGINTNOT NULL GENERATED BY DEFAULT AS IDENTITY,
7
7
imported TIMESTAMPTZNOT NULL DEFAULT NOW(),
8
-
osm_date dateNOT NULL,
8
+
osm_date TIMESTAMPTZNOT NULL,
9
9
region textNOT NULL,
10
10
layerset TEXTNULL,
11
11
srid textNOT NULL,
@@ -43,10 +43,12 @@ ALTER TABLE {schema_name}.pgosm_flex
43
43
ALTERTABLE {schema_name}.pgosm_flex DROP COLUMN IF EXISTS project_url;
44
44
ALTERTABLE {schema_name}.pgosm_flex DROP COLUMN IF EXISTS default_date;
45
45
46
+
ALTERTABLE {schema_name}.pgosm_flex ALTER COLUMN osm_date TYPE TIMESTAMPTZ;
47
+
46
48
COMMENT ON TABLE {schema_name}.pgosm_flex IS 'Provides meta information on the PgOSM-Flex project including version and SRID used during the import. One row per import.';
47
49
48
50
COMMENT ON COLUMN {schema_name}.pgosm_flex.imported IS 'Indicates when the import was ran.';
49
-
COMMENT ON COLUMN {schema_name}.pgosm_flex.osm_date IS 'Indicates the date of the OpenStreetMap data loaded. Recommended to set PGOSM_DATE env var at runtime, otherwise defaults to the date PgOSM-Flex was run.';
51
+
COMMENT ON COLUMN {schema_name}.pgosm_flex.osm_date IS 'Indicates the date of the OpenStreetMap data loaded. Uses timestamp from PBF file metadata when available. If metadata not available this represents --osm-date at runtime, or the date of today in timezone based on computer running import.';
50
52
COMMENT ON COLUMN {schema_name}.pgosm_flex.srid IS 'SRID of imported data.';
51
53
COMMENT ON COLUMN {schema_name}.pgosm_flex.pgosm_flex_version IS 'Version of PgOSM-Flex used to generate schema.';
52
54
COMMENT ON COLUMN {schema_name}.pgosm_flex.osm2pgsql_version IS 'Version of osm2pgsql used to load data.';
0 commit comments