aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/database.sql2
-rw-r--r--install/update.php12
2 files changed, 13 insertions, 1 deletions
diff --git a/install/database.sql b/install/database.sql
index 7f6a128c9..acf59a36d 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -615,6 +615,7 @@ CREATE TABLE IF NOT EXISTS `likes` (
CREATE TABLE IF NOT EXISTS `mail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `convid` int(10) unsigned NOT NULL DEFAULT '0',
`mail_flags` int(10) unsigned NOT NULL DEFAULT '0',
`from_xchan` char(255) NOT NULL DEFAULT '',
`to_xchan` char(255) NOT NULL DEFAULT '',
@@ -628,6 +629,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
+ KEY `convid` (`convid`),
KEY `created` (`created`),
KEY `mail_flags` (`mail_flags`),
KEY `account_id` (`account_id`),
diff --git a/install/update.php b/install/update.php
index 7c05173c0..5319942ee 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1126 );
+define( 'UPDATE_VERSION' , 1127 );
/**
*
@@ -1430,3 +1430,13 @@ function update_r1125() {
}
+
+function update_r1126() {
+ $r = q("ALTER TABLE `mail` ADD `convid` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `id` ,
+ADD INDEX ( `convid` )");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+
+}
+