From fc2962a58ebda37c9bfef0b78bbdfd4466317a4c Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sun, 20 Dec 2009 12:02:00 -0500 Subject: [PATCH] Add creation scripts (not upgrade scripts) for the geo location tables. 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 | 10 ++++++++++ kronolith/scripts/sql/kronolth_add_geo.sql | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100644 kronolith/scripts/sql/kronolith_geo.mysql.sql create mode 100644 kronolith/scripts/sql/kronolth_add_geo.sql diff --git a/kronolith/scripts/sql/kronolith_geo.mysql.sql b/kronolith/scripts/sql/kronolith_geo.mysql.sql new file mode 100644 index 000000000..4b10c5575 --- /dev/null +++ b/kronolith/scripts/sql/kronolith_geo.mysql.sql @@ -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 index 000000000..bfeaf78fe --- /dev/null +++ b/kronolith/scripts/sql/kronolth_add_geo.sql @@ -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 -- 2.11.0