aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/database.sql4
-rw-r--r--install/update.php10
2 files changed, 12 insertions, 2 deletions
diff --git a/install/database.sql b/install/database.sql
index cb4846b52..e2b814067 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -581,6 +581,7 @@ CREATE TABLE IF NOT EXISTS `likes` (
`iid` int(10) unsigned NOT NULL DEFAULT '0',
`verb` char(255) NOT NULL DEFAULT '',
`target_type` char(255) NOT NULL DEFAULT '',
+ `target_id` char(128) NOT NULL DEFAULT '',
`target` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `channel_id` (`channel_id`),
@@ -588,7 +589,8 @@ CREATE TABLE IF NOT EXISTS `likes` (
KEY `likee` (`likee`),
KEY `iid` (`iid`),
KEY `verb` (`verb`),
- KEY `target_type` (`target_type`)
+ KEY `target_type` (`target_type`),
+ KEY `target_id` (`target_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `mail` (
diff --git a/install/update.php b/install/update.php
index b6bcfa237..bdf84144c 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1114 );
+define( 'UPDATE_VERSION' , 1115 );
/**
*
@@ -1283,3 +1283,11 @@ ADD INDEX ( `channel_id` )");
return UPDATE_FAILED;
}
+function update_r1114() {
+ $r = q("ALTER TABLE `likes` ADD `target_id` CHAR( 128 ) NOT NULL DEFAULT '' AFTER `target_type` ,
+ADD INDEX ( `target_id` )");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+