diff --git a/server/db/postgres/postgres.go b/server/db/postgres/postgres.go index 9a42a2c..4fdb673 100644 --- a/server/db/postgres/postgres.go +++ b/server/db/postgres/postgres.go @@ -2,7 +2,7 @@ package postgres import ( "database/sql" - _ "https://github.com/lib/pq" + _ "github.com/lib/pq" "mapserver/coords" "mapserver/db" ) diff --git a/server/go.mod b/server/go.mod index f87a305..21dd7db 100644 --- a/server/go.mod +++ b/server/go.mod @@ -5,6 +5,7 @@ require ( github.com/google/go-cmp v0.2.0 // indirect github.com/google/pprof v0.0.0-20190109223431-e84dfd68c163 // indirect github.com/gorilla/websocket v1.4.0 + github.com/lib/pq v1.0.0 github.com/mattn/go-sqlite3 v1.10.0 github.com/mjibson/esc v0.1.0 // indirect github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect diff --git a/server/go.sum b/server/go.sum index 67e9990..d21174c 100644 --- a/server/go.sum +++ b/server/go.sum @@ -10,6 +10,8 @@ github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mjibson/esc v0.1.0 h1:5ch+murgrcwDFLOE2hwj0f7kE4xJfJhkSCAjSLY182o= diff --git a/server/mapobjectdb/sqlite/sql.go b/server/mapobjectdb/sqlite/sql.go index b0134b8..a465d2c 100644 --- a/server/mapobjectdb/sqlite/sql.go +++ b/server/mapobjectdb/sqlite/sql.go @@ -27,6 +27,8 @@ create table if not exists object_attributes( primary key(objectid, key) ); +create index if not exists object_attributes_key_value on object_attributes(key, value); + create table if not exists tiles( data blob, mtime bigint,