aboutsummaryrefslogtreecommitdiff
path: root/engine/schema
diff options
context:
space:
mode:
Diffstat (limited to 'engine/schema')
-rw-r--r--engine/schema/mysql.sql2
-rw-r--r--engine/schema/upgrades/2009051401.sql5
2 files changed, 6 insertions, 1 deletions
diff --git a/engine/schema/mysql.sql b/engine/schema/mysql.sql
index 2c32482be..e8d823a3b 100644
--- a/engine/schema/mysql.sql
+++ b/engine/schema/mysql.sql
@@ -284,7 +284,7 @@ CREATE TABLE `prefix_geocode_cache` (
`long` varchar(20),
PRIMARY KEY (`id`),
- KEY `location` (`location`)
+ UNIQUE KEY `location` (`location`)
) ENGINE=MEMORY;
diff --git a/engine/schema/upgrades/2009051401.sql b/engine/schema/upgrades/2009051401.sql
new file mode 100644
index 000000000..57348968e
--- /dev/null
+++ b/engine/schema/upgrades/2009051401.sql
@@ -0,0 +1,5 @@
+-- Fix error in geocode cache table
+DELETE FROM `prefix_geocode_cache`;
+
+ALTER TABLE `prefix_geocode_cache` DROP KEY `location`;
+ALTER TABLE `prefix_geocode_cache` ADD UNIQUE KEY `location` (`location`);