aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-06-23 05:19:28 -0700
committerfriendica <info@friendica.com>2014-06-23 05:19:28 -0700
commit0cfcb023118444bac29014e06a14fc1af2d0cf75 (patch)
tree5f63da84a1ee111cd68481a184c314ae5407c8fd /install
parentd43227a730927c88745c5c35029fd57562265e3e (diff)
downloadvolse-hubzilla-0cfcb023118444bac29014e06a14fc1af2d0cf75.tar.gz
volse-hubzilla-0cfcb023118444bac29014e06a14fc1af2d0cf75.tar.bz2
volse-hubzilla-0cfcb023118444bac29014e06a14fc1af2d0cf75.zip
ability to like things
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;
+}
+