Skip to content

Commit

Permalink
Remove refresh scripts and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bchapuis committed Jan 6, 2025
1 parent b3ab2dd commit 4dd5ef4
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ void resetDatabase() throws SQLException, IOException {
PostgresUtils.executeResource(connection, "queries/osm_drop_tables.sql");
PostgresUtils.executeResource(connection, "queries/osm_drop_tables.sql");
PostgresUtils.executeResource(connection, "queries/osm_create_tables.sql");
assertTrue(tableExists("osm_headers"));
assertTrue(tableExists("osm_nodes"));
assertTrue(tableExists("osm_ways"));
assertTrue(tableExists("osm_relations"));
assertTrue(tableExists("osm_header"));
assertTrue(tableExists("osm_node"));
assertTrue(tableExists("osm_way"));
assertTrue(tableExists("osm_relation"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
CREATE
INDEX CONCURRENTLY IF NOT EXISTS osm_ways_gin ON
osm_ways
INDEX IF NOT EXISTS osm_way_gin ON
osm_way
USING gin(nodes);

CREATE
INDEX CONCURRENTLY IF NOT EXISTS osm_relations_gin ON
osm_relations
INDEX IF NOT EXISTS osm_relation_gin ON
osm_relation
USING gin(member_refs);
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
CREATE
INDEX CONCURRENTLY IF NOT EXISTS osm_nodes_gix ON
osm_nodes
INDEX IF NOT EXISTS osm_nodes_gix ON
osm_node
USING GIST(geom);

CREATE
INDEX CONCURRENTLY IF NOT EXISTS osm_ways_gix ON
osm_ways
INDEX IF NOT EXISTS osm_ways_gix ON
osm_way
USING GIST(geom);

CREATE
INDEX CONCURRENTLY IF NOT EXISTS osm_relations_gix ON
osm_relations
INDEX IF NOT EXISTS osm_relations_gix ON
osm_relation
USING GIST(geom);
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
CREATE
INDEX CONCURRENTLY IF NOT EXISTS osm_nodes_gix ON
osm_nodes
INDEX IF NOT EXISTS osm_node_gix ON
osm_node
USING SPGIST(geom);

CREATE
INDEX CONCURRENTLY IF NOT EXISTS osm_ways_gix ON
osm_ways
INDEX IF NOT EXISTS osm_way_gix ON
osm_way
USING SPGIST(geom);

CREATE
INDEX CONCURRENTLY IF NOT EXISTS osm_relations_gix ON
osm_relations
INDEX IF NOT EXISTS osm_relation_gix ON
osm_relation
USING SPGIST(geom);
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
-- limitations under the License.
CREATE
TABLE
IF NOT EXISTS osm_headers(
IF NOT EXISTS osm_header(
replication_sequence_number BIGINT PRIMARY KEY,
replication_timestamp TIMESTAMP WITHOUT TIME ZONE,
replication_url text,
Expand All @@ -24,7 +24,7 @@ CREATE

CREATE
TABLE
osm_nodes(
osm_node(
id BIGINT PRIMARY KEY,
version INT,
uid INT,
Expand All @@ -38,7 +38,7 @@ CREATE

CREATE
TABLE
osm_ways(
osm_way(
id BIGINT PRIMARY KEY,
version INT,
uid INT,
Expand All @@ -51,7 +51,7 @@ CREATE

CREATE
TABLE
osm_relations(
osm_relation(
id BIGINT PRIMARY KEY,
version INT,
uid INT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
-- limitations under the License.
DROP
TABLE
IF EXISTS osm_headers;
IF EXISTS osm_header;

DROP
TABLE
IF EXISTS osm_nodes;
IF EXISTS osm_node;

DROP
TABLE
IF EXISTS osm_ways;
IF EXISTS osm_way;

DROP
TABLE
IF EXISTS osm_relations;
IF EXISTS osm_relation;
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
-- limitations under the License.

TRUNCATE TABLE
osm_headers;
osm_header;

TRUNCATE TABLE
osm_nodes;
osm_node;

TRUNCATE TABLE
osm_ways;
osm_way;

TRUNCATE TABLE
osm_relations;
osm_relation;
31 changes: 0 additions & 31 deletions basemap/layers/linestring/refresh.sql

This file was deleted.

31 changes: 0 additions & 31 deletions basemap/layers/polygon/refresh.sql

This file was deleted.

2 changes: 0 additions & 2 deletions basemap/refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ export default {
// "layers/way/refresh.sql",
// "layers/relation/refresh.sql",
// "layers/member/refresh.sql",
// "layers/linestring/refresh.sql",
// "layers/polygon/refresh.sql",
// "layers/highway/refresh.sql",
// "layers/landuse/refresh.sql",
// "layers/leisure/refresh.sql",
Expand Down

0 comments on commit 4dd5ef4

Please sign in to comment.