X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=database.sql;h=da3462a752e82d0c5237a80f2969c4549885724a;hb=290da6c845294d3bf02b581c500d5083d9f4dd72;hp=dc586bc2be01851a1a4eeea2912dba39bca0afd5;hpb=584ac68ae4a230c7a61b2720be8bac3de34d68da;p=friendica.git diff --git a/database.sql b/database.sql index dc586bc2be..da3462a752 100644 --- a/database.sql +++ b/database.sql @@ -173,6 +173,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( `readonly` tinyint(1) NOT NULL DEFAULT '0', `writable` tinyint(1) NOT NULL DEFAULT '0', `forum` tinyint(1) NOT NULL DEFAULT '0', + `prv` tinyint(1) NOT NULL DEFAULT '0', `hidden` tinyint(1) NOT NULL DEFAULT '0', `archive` tinyint(1) NOT NULL DEFAULT '0', `pending` tinyint(1) NOT NULL DEFAULT '1', @@ -253,16 +254,26 @@ CREATE TABLE IF NOT EXISTS `event` ( `edited` datetime NOT NULL, `start` datetime NOT NULL, `finish` datetime NOT NULL, + `summary` text NOT NULL, `desc` text NOT NULL, `location` text NOT NULL, `type` char(255) NOT NULL, `nofinish` tinyint(1) NOT NULL DEFAULT '0', `adjust` tinyint(1) NOT NULL DEFAULT '1', + `ignore` tinyint(1) NOT NULL DEFAULT '0', `allow_cid` mediumtext NOT NULL, `allow_gid` mediumtext NOT NULL, `deny_cid` mediumtext NOT NULL, `deny_gid` mediumtext NOT NULL, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + KEY `uid` ( `uid` ), + KEY `cid` ( `cid` ), + KEY `uri` ( `uri` ), + KEY `type` ( `type` ), + KEY `start` ( `start` ), + KEY `finish` ( `finish` ), + KEY `adjust` ( `adjust` ), + KEY `ignore` ( `ignore` ), ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -447,6 +458,7 @@ CREATE TABLE IF NOT EXISTS `hook` ( `hook` char(255) NOT NULL, `file` char(255) NOT NULL, `function` char(255) NOT NULL, + `priority` int(11) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -560,6 +572,9 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `moderated` (`moderated`), KEY `spam` (`spam`), KEY `author-name` (`author-name`), + KEY `uid_commented` (`uid`, `commented`), + KEY `uid_created` (`uid`, `created`), + KEY `uid_unseen` (`uid`, `unseen`), FULLTEXT KEY `title` (`title`), FULLTEXT KEY `body` (`body`), FULLTEXT KEY `allow_cid` (`allow_cid`), @@ -589,6 +604,19 @@ CREATE TABLE IF NOT EXISTS `item_id` ( -- -------------------------------------------------------- +-- +-- Table structure for table `locks` +-- + +CREATE TABLE IF NOT EXISTS `locks` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` char(128) NOT NULL, + `locked` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + -- -- Table structure for table `mail` -- @@ -744,6 +772,7 @@ CREATE TABLE IF NOT EXISTS `photo` ( `desc` text NOT NULL, `album` char(255) NOT NULL, `filename` char(255) NOT NULL, + `type` CHAR(128) NOT NULL DEFAULT 'image/jpeg', `height` smallint(6) NOT NULL, `width` smallint(6) NOT NULL, `data` mediumblob NOT NULL, @@ -819,14 +848,18 @@ CREATE TABLE IF NOT EXISTS `profile` ( `region` char(255) NOT NULL, `postal-code` char(32) NOT NULL, `country-name` char(255) NOT NULL, + `hometown` char(255) NOT NULL, `gender` char(32) NOT NULL, `marital` char(255) NOT NULL, `with` text NOT NULL, + `howlong` datetime NOT NULL default '0000-00-00 00:00:00', `sexual` char(255) NOT NULL, `politic` char(255) NOT NULL, `religion` char(255) NOT NULL, `pub_keywords` text NOT NULL, `prv_keywords` text NOT NULL, + `likes` text NOT NULL, + `dislikes` text NOT NULL, `about` text NOT NULL, `summary` char(255) NOT NULL, `music` text NOT NULL, @@ -941,12 +974,14 @@ CREATE TABLE IF NOT EXISTS `session` ( CREATE TABLE IF NOT EXISTS `sign` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `iid` int(10) unsigned NOT NULL, + `iid` int(10) unsigned NOT NULL DEFAULT '0', + `retract_iid` int(10) unsigned NOT NULL DEFAULT '0', `signed_text` mediumtext NOT NULL, `signature` text NOT NULL, `signer` char(255) NOT NULL, PRIMARY KEY (`id`), - KEY `iid` (`iid`) + KEY `iid` (`iid`), + KEY `retract_iid` (`retract_iid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -971,6 +1006,26 @@ CREATE TABLE IF NOT EXISTS `spam` ( -- -------------------------------------------------------- +-- +-- Table structure for table `term` +-- + +CREATE TABLE IF NOT EXISTS `term` ( + `tid` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `oid` INT UNSIGNED NOT NULL , + `otype` TINYINT( 3 ) UNSIGNED NOT NULL , + `type` TINYINT( 3 ) UNSIGNED NOT NULL , + `term` CHAR( 255 ) NOT NULL , + `url` CHAR( 255 ) NOT NULL, + PRIMARY KEY (`tid`), + KEY `oid` ( `oid` ), + KEY `otype` ( `otype` ), + KEY `type` ( `type` ), + KEY `term` ( `term` ) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- -------------------------------------------------------- + -- -- Table structure for table `tokens` -- @@ -1027,6 +1082,8 @@ CREATE TABLE IF NOT EXISTS `user` ( `account_expired` tinyint(1) NOT NULL DEFAULT '0', `account_expires_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `service_class` char(32) NOT NULL, + `def_gid` int(11) NOT NULL DEFAULT '0', `allow_cid` mediumtext NOT NULL, `allow_gid` mediumtext NOT NULL, `deny_cid` mediumtext NOT NULL, @@ -1042,7 +1099,8 @@ CREATE TABLE IF NOT EXISTS `user` ( KEY `verified` (`verified`), KEY `unkmail` (`unkmail`), KEY `cntunkmail` (`cntunkmail`), - KEY `account_removed` (`account_removed`) + KEY `account_removed` (`account_removed`), + KEY `service_class` (`service_class`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- --------------------------------------------------------