mirror of
https://github.com/friendica/friendica
synced 2025-09-05 19:58:31 +02:00
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
43
database.sql
43
database.sql
|
@ -1192,3 +1192,46 @@ CREATE TABLE IF NOT EXISTS `unique_contacts` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `url` (`url`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `thread`
|
||||
--
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue