From df31ef14a1f2e5ea6cb9a27b8bb7e719c9c483a9 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 4 Jan 2018 19:34:48 +0000 Subject: [PATCH] share/sql/geo.sql --- lib/php/db/table.php | 1 - share/sql/geo.sql | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 50174522..a71672db 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -796,7 +796,6 @@ Class Table extends nb { #bye("$equal$v"); #if (preg_match("/(LIKE|$regexp) ..$/","$equal$v")) { if (preg_match("/^(LIKE|$regexp)$/",trim($equal))) { - #if (trim($equal) == 'LIKE' or trim($equal) == $regexp) { if ($field->null) $k = 'COALESCE('.$name.','.$this->db()->quote('').")"; } elseif ($field->extras) { diff --git a/share/sql/geo.sql b/share/sql/geo.sql index 655caf0b..c567b051 100644 --- a/share/sql/geo.sql +++ b/share/sql/geo.sql @@ -42,7 +42,7 @@ CREATE TABLE IF NOT EXISTS geo ( GRANT ALL ON ALL TABLES IN SCHEMA public TO www; GRANT ALL ON ALL TABLES IN SCHEMA public TO nico; GRANT ALL ON ALL TABLES IN SCHEMA public TO root; -CREATE INDEX IF NOT EXISTS geo_country_idx ON geo (country); +CREATE INDEX geo_country_idx ON geo (country); BEGIN TRANSACTION; DELETE FROM geo; COPY geo FROM PROGRAM 'curl -s http://download.geonames.org/export/dump/allCountries.zip | zcat' WITH (format 'text', NULL ''); -- 2.47.3