aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-15 17:59:49 -0800
committerfriendica <info@friendica.com>2013-01-15 17:59:49 -0800
commit275fa6e1d26b4ce3090719c9b9d913ef1f2091a1 (patch)
tree4daceca2f1ac3c294e0e86ae776d41f01d2b3887 /install
parented275cd40d3462c302aa1b06a878630750928992 (diff)
downloadvolse-hubzilla-275fa6e1d26b4ce3090719c9b9d913ef1f2091a1.tar.gz
volse-hubzilla-275fa6e1d26b4ce3090719c9b9d913ef1f2091a1.tar.bz2
volse-hubzilla-275fa6e1d26b4ce3090719c9b9d913ef1f2091a1.zip
events backend heavy lifting - the new structure is slowly emerging.
Diffstat (limited to 'install')
-rw-r--r--install/database.sql4
-rw-r--r--install/update.php12
2 files changed, 14 insertions, 2 deletions
diff --git a/install/database.sql b/install/database.sql
index addf797a7..c8b9d4867 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -223,6 +223,7 @@ CREATE TABLE IF NOT EXISTS `event` (
`aid` int(10) unsigned NOT NULL DEFAULT '0',
`uid` int(11) NOT NULL,
`event_xchan` char(255) NOT NULL DEFAULT '',
+ `event_hash` char(255) NOT NULL DEFAULT '',
`message_id` char(255) NOT NULL,
`created` datetime NOT NULL,
`edited` datetime NOT NULL,
@@ -249,7 +250,8 @@ CREATE TABLE IF NOT EXISTS `event` (
KEY `adjust` (`adjust`),
KEY `nofinish` (`nofinish`),
KEY `ignore` (`ignore`),
- KEY `aid` (`aid`)
+ KEY `aid` (`aid`),
+ KEY `event_hash` (`event_hash`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `fcontact` (
diff --git a/install/update.php b/install/update.php
index 63d65c89c..5479f1e26 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1018 );
+define( 'UPDATE_VERSION' , 1019 );
/**
*
@@ -269,3 +269,13 @@ function update_r1017() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
+
+function update_r1018() {
+ $r = q("ALTER TABLE `event` ADD `event_hash` CHAR( 255 ) NOT NULL DEFAULT '' AFTER `event_xchan` ,
+ADD INDEX ( `event_hash` )");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+