likes table for liking things besides posts and comments
This commit is contained in:
parent
a175c7dba7
commit
a0747799fc
2
boot.php
2
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' );
|
||||
|
@ -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',
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
2014-06-21.713
|
||||
2014-06-22.714
|
||||
|
Reference in New Issue
Block a user