Add creation scripts (not upgrade scripts) for the geo location tables.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 20 Dec 2009 17:02:00 +0000 (12:02 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 20 Dec 2009 17:03:50 +0000 (12:03 -0500)
Used seperate scripts since we shouldn't assume the install wants to use
gis enabled tables for mysql.

kronolith/scripts/sql/kronolith_geo.mysql.sql [new file with mode: 0644]
kronolith/scripts/sql/kronolth_add_geo.sql [new file with mode: 0644]

diff --git a/kronolith/scripts/sql/kronolith_geo.mysql.sql b/kronolith/scripts/sql/kronolith_geo.mysql.sql
new file mode 100644 (file)
index 0000000..4b10c55
--- /dev/null
@@ -0,0 +1,10 @@
+-- This script creates the table and indexs necessary to use kronolith's geo
+-- location features with a gis extension enabled mySQL database.
+
+CREATE TABLE kronolith_events_geo (
+    event_id VARCHAR(32) NOT NULL,
+    event_coordinates POINT NOT NULL,
+    SPATIAL INDEX (event_coordinates)
+);
+
+CREATE INDEX kronolith_events_geo_idx ON kronolith_events_geo (event_id);
\ No newline at end of file
diff --git a/kronolith/scripts/sql/kronolth_add_geo.sql b/kronolith/scripts/sql/kronolth_add_geo.sql
new file mode 100644 (file)
index 0000000..bfeaf78
--- /dev/null
@@ -0,0 +1,9 @@
+-- Use this script to create the table and index necessary for geo location
+-- support without mysql spatial extension support.
+CREATE TABLE kronolith_events_geo (
+    event_id VARCHAR(32) NOT NULL,
+    event_lat VARCHAR(32) NOT NULL,
+    event_lon VARCHAR(32) NOT NULL
+);
+
+CREATE INDEX kronolith_events_geo_idx ON kronolith_events_geo (event_id);
\ No newline at end of file