]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
mail settings: inflate/deflate settings
[friendica.git] / database.sql
index eadb53cc6422f10cf65f887b3c89265fc4024b2c..69d87c3698c3a85a4a814d7885bdd32f5d93fcb6 100644 (file)
@@ -16,9 +16,11 @@ CREATE TABLE IF NOT EXISTS `addon` (
   `name` char(255) NOT NULL,
   `version` char(255) NOT NULL,
   `installed` tinyint(1) NOT NULL DEFAULT '0',
+  `hidden` tinyint(1) NOT NULL DEFAULT '0',
   `timestamp` bigint(20) NOT NULL DEFAULT '0',
   `plugin_admin` tinyint(1) NOT NULL DEFAULT '0',
-  PRIMARY KEY (`id`)
+  PRIMARY KEY (`id`),
+  KEY `hidden` (`hidden`)  
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 
 -- --------------------------------------------------------
@@ -171,7 +173,9 @@ 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',
   `rating` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0-5 reputation, 0 unknown, 1 call police, 5 inscrutable',
   `reason` text NOT NULL COMMENT 'why a rating was given - will help friends decide to make friends or not',
@@ -197,6 +201,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
   KEY `nurl` (`nurl`),
   KEY `pending` (`pending`),
   KEY `hidden` (`hidden`),
+  KEY `archive` (`archive`),
   KEY `forum` (`forum`)
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 
@@ -236,6 +241,20 @@ CREATE TABLE IF NOT EXISTS `deliverq` (
 
 -- --------------------------------------------------------
 
+--
+-- Table structure for table `dsprphotoq`
+--
+
+CREATE TABLE `dsprphotoq` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `uid` int(11) NOT NULL,
+  `msg` mediumtext NOT NULL,
+  `attempt` tinyint(4) NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
 --
 -- Table structure for table `event`
 --
@@ -249,16 +268,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;
 
 -- --------------------------------------------------------
@@ -380,11 +409,13 @@ CREATE TABLE IF NOT EXISTS `glink` (
   `cid` int(11) NOT NULL,
   `uid` int(11) NOT NULL,
   `gcid` int(11) NOT NULL,
+  `zcid` int(11) NOT NULL,
   `updated` datetime NOT NULL,
   PRIMARY KEY (`id`),
   KEY `cid` (`cid`),
   KEY `uid` (`uid`),
   KEY `gcid` (`gcid`),
+  KEY `zcid` (`zcid`),
   KEY `updated` (`updated`)
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 
@@ -441,6 +472,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;
 
@@ -528,7 +560,9 @@ CREATE TABLE IF NOT EXISTS `item` (
   `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',
   `last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
+  `network` char(32) NOT NULL,
   PRIMARY KEY (`id`),
   KEY `uri` (`uri`),
   KEY `uid` (`uid`),
@@ -554,6 +588,13 @@ 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`),
+  KEY `mention` (`mention`),
+  KEY `resource-id` (`resource-id`),
+  KEY `event_id` (`event-id`),
+  KEY `network` (`network`),
   FULLTEXT KEY `title` (`title`),
   FULLTEXT KEY `body` (`body`),
   FULLTEXT KEY `allow_cid` (`allow_cid`),
@@ -571,11 +612,13 @@ CREATE TABLE IF NOT EXISTS `item` (
 --
 
 CREATE TABLE IF NOT EXISTS `item_id` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
   `iid` int(11) NOT NULL,
   `uid` int(11) NOT NULL,
   `sid` char(255) NOT NULL,
   `service` char(255) NOT NULL,
-  PRIMARY KEY (`iid`),
+  PRIMARY KEY (`id`),
+  KEY `iid` (`iid`),
   KEY `uid` (`uid`),
   KEY `sid` (`sid`),
   KEY `service` (`service`)
@@ -583,6 +626,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`
 --
@@ -738,8 +794,10 @@ 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,
+  `datasize` int(10) unsigned NOT NULL DEFAULT '0',
   `data` mediumblob NOT NULL,
   `scale` tinyint(3) NOT NULL,
   `profile` tinyint(1) NOT NULL DEFAULT '0',
@@ -752,6 +810,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
   KEY `resource-id` (`resource-id`),
   KEY `album` (`album`),
   KEY `scale` (`scale`),
+  KEY `datasize` (`datasize`),
   KEY `profile` (`profile`)
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 
@@ -813,14 +872,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,
@@ -935,12 +998,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;
 
 -- --------------------------------------------------------
@@ -965,6 +1030,30 @@ CREATE TABLE IF NOT EXISTS `spam` (
 
 -- --------------------------------------------------------
 
+--
+-- Table structure for table `term`
+--
+
+CREATE TABLE IF NOT EXISTS `term` (
+  `tid` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `aid` int(10) unsigned NOT NULL DEFAULT '0',
+  `uid` int(10) unsigned NOT NULL DEFAULT '0',
+  `oid` int(10) 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`),
+  KEY `uid` (`uid`),
+  KEY `aid` (`aid`)
+) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
 --
 -- Table structure for table `tokens`
 --
@@ -1017,9 +1106,12 @@ CREATE TABLE IF NOT EXISTS `user` (
   `pwdreset` char(255) NOT NULL,
   `maxreq` int(11) NOT NULL DEFAULT '10',
   `expire` int(10) unsigned NOT NULL DEFAULT '0',
+  `account_removed` tinyint(1) NOT NULL DEFAULT '0',
   `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,
@@ -1034,7 +1126,9 @@ CREATE TABLE IF NOT EXISTS `user` (
   KEY `blocked` (`blocked`),
   KEY `verified` (`verified`),
   KEY `unkmail` (`unkmail`),
-  KEY `cntunkmail` (`cntunkmail`)
+  KEY `cntunkmail` (`cntunkmail`),
+  KEY `account_removed` (`account_removed`),
+  KEY `service_class` (`service_class`)
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 
 -- --------------------------------------------------------
@@ -1048,3 +1142,17 @@ CREATE TABLE IF NOT EXISTS `userd` (
   `username` char(255) NOT NULL,
   PRIMARY KEY (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `tag`
+--
+
+CREATE TABLE IF NOT EXISTS `tag` (
+  `iid` int(11) NOT NULL,
+  `tag` char(255) NOT NULL,
+  `link` char(255) NOT NULL,
+  PRIMARY KEY (`iid`, `tag`),
+  KEY `tag` (`tag`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;