Database stuff. New table "thread". Changing "left join" to "inner join", removing "limit 1" at update and delete.
This commit is contained in:
parent
2b5345323f
commit
6b8585d48d
33 changed files with 487 additions and 444 deletions
47
update.php
47
update.php
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1169 );
|
||||
define( 'UPDATE_VERSION' , 1170 );
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -1557,3 +1557,48 @@ function update_1168() {
|
|||
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
function update_1169() {
|
||||
$r = q("CREATE TABLE IF NOT EXISTS `thread` (
|
||||
`iid` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`uid` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`contact-id` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`wall` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`private` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`pubmail` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`moderated` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`visible` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`spam` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`starred` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`bookmark` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`unseen` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`deleted` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`origin` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`forum_mode` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`mention` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`network` char(32) NOT NULL,
|
||||
PRIMARY KEY (`iid`),
|
||||
KEY `uid` (`uid`),
|
||||
KEY `contact-id` (`contact-id`),
|
||||
KEY `created` (`created`),
|
||||
KEY `edited` (`edited`),
|
||||
KEY `commented` (`commented`),
|
||||
KEY `received` (`received`),
|
||||
KEY `changed` (`changed`),
|
||||
KEY `network` (`network`)
|
||||
KEY `visible_deleted_moderated_private_wall_received` (`visible`,`deleted`,`moderated`,`private`,`wall`,`received`),
|
||||
KEY `uid_visible_deleted_moderated_created` (`uid`,`visible`,`deleted`,`moderated`,`created`),
|
||||
KEY `uid_visible_deleted_moderated_commented` (`uid`,`visible`,`deleted`,`moderated`,`commented`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
|
||||
if (!$r)
|
||||
return UPDATE_FAILED;
|
||||
|
||||
proc_run('php',"include/threadupdate.php");
|
||||
|
||||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue