aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
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;
+}