aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-15 16:48:59 -0800
committerfriendica <info@friendica.com>2013-01-15 16:48:59 -0800
commited275cd40d3462c302aa1b06a878630750928992 (patch)
treef49d9be934fef03e748fe5e9ad1f3bca52587e66 /install
parent482e0659c4f9525ba26a3b9344f39f8694e09304 (diff)
downloadvolse-hubzilla-ed275cd40d3462c302aa1b06a878630750928992.tar.gz
volse-hubzilla-ed275cd40d3462c302aa1b06a878630750928992.tar.bz2
volse-hubzilla-ed275cd40d3462c302aa1b06a878630750928992.zip
slow progress on events, one step forward, one step back.
Diffstat (limited to 'install')
-rw-r--r--install/database.sql4
-rw-r--r--install/update.php9
2 files changed, 10 insertions, 3 deletions
diff --git a/install/database.sql b/install/database.sql
index 00eada940..addf797a7 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -222,7 +222,7 @@ CREATE TABLE IF NOT EXISTS `event` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`aid` int(10) unsigned NOT NULL DEFAULT '0',
`uid` int(11) NOT NULL,
- `cid` int(11) NOT NULL,
+ `event_xchan` char(255) NOT NULL DEFAULT '',
`message_id` char(255) NOT NULL,
`created` datetime NOT NULL,
`edited` datetime NOT NULL,
@@ -241,7 +241,7 @@ CREATE TABLE IF NOT EXISTS `event` (
`deny_gid` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
- KEY `cid` (`cid`),
+ KEY `event_xchan` (`event_xchan`),
KEY `uri` (`message_id`),
KEY `type` (`type`),
KEY `start` (`start`),
diff --git a/install/update.php b/install/update.php
index c29a5fcea..63d65c89c 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1017 );
+define( 'UPDATE_VERSION' , 1018 );
/**
*
@@ -262,3 +262,10 @@ function update_r1016() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
+
+function update_r1017() {
+ $r = q("ALTER TABLE `event` CHANGE `cid` `event_xchan` CHAR( 255 ) NOT NULL DEFAULT '', ADD INDEX ( `event_xchan` ), drop index cid ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}