aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-06-22 03:39:43 -0700
committerfriendica <info@friendica.com>2014-06-22 03:39:43 -0700
commita0747799fcbec42862333611026baccfc8bcacdc (patch)
tree9b364e5937e6c26dc9fde3e5f410239972fbf816
parenta175c7dba7e6ceb3823cfb9de8d8b74355e9da57 (diff)
downloadvolse-hubzilla-a0747799fcbec42862333611026baccfc8bcacdc.tar.gz
volse-hubzilla-a0747799fcbec42862333611026baccfc8bcacdc.tar.bz2
volse-hubzilla-a0747799fcbec42862333611026baccfc8bcacdc.zip
likes table for liking things besides posts and comments
-rwxr-xr-xboot.php2
-rw-r--r--install/database.sql16
-rw-r--r--install/update.php24
-rw-r--r--version.inc2
4 files changed, 41 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index 3855ecd58..3a9f93d5e 100755
--- a/boot.php
+++ b/boot.php
@@ -47,7 +47,7 @@ define ( 'RED_PLATFORM', 'Red Matrix' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
-define ( 'DB_UPDATE_VERSION', 1112 );
+define ( 'DB_UPDATE_VERSION', 1113 );
define ( 'EOL', '<br />' . "\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
diff --git a/install/database.sql b/install/database.sql
index 82c96019e..388bfdfd2 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -573,6 +573,22 @@ CREATE TABLE IF NOT EXISTS `item_id` (
KEY `iid` (`iid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE IF NOT EXISTS `likes` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `liker` char(128) NOT NULL DEFAULT '',
+ `likee` char(128) NOT NULL DEFAULT '',
+ `iid` int(11) NOT NULL DEFAULT '0',
+ `verb` char(255) NOT NULL DEFAULT '',
+ `target_type` char(255) NOT NULL DEFAULT '',
+ `target` mediumtext NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `liker` (`liker`),
+ KEY `likee` (`likee`),
+ KEY `iid` (`iid`),
+ KEY `verb` (`verb`),
+ KEY `target_type` (`target_type`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
CREATE TABLE IF NOT EXISTS `mail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mail_flags` int(10) unsigned NOT NULL DEFAULT '0',
diff --git a/install/update.php b/install/update.php
index 0d5d26237..4981acc5d 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1112 );
+define( 'UPDATE_VERSION' , 1113 );
/**
*
@@ -1251,3 +1251,25 @@ function update_r1111() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
+
+function update_r1112() {
+ $r = q("CREATE TABLE IF NOT EXISTS `likes` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `liker` char(128) NOT NULL DEFAULT '',
+ `likee` char(128) NOT NULL DEFAULT '',
+ `iid` int(11) NOT NULL DEFAULT '0',
+ `verb` char(255) NOT NULL DEFAULT '',
+ `target_type` char(255) NOT NULL DEFAULT '',
+ `target` mediumtext NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `liker` (`liker`),
+ KEY `likee` (`likee`),
+ KEY `iid` (`iid`),
+ KEY `verb` (`verb`),
+ KEY `target_type` (`target_type`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8");
+
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
diff --git a/version.inc b/version.inc
index ffad4110b..70a8e48e8 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2014-06-21.713
+2014-06-22.714