]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
DOCS: clarify Settings also discusses the Admin Panel
[friendica.git] / database.sql
index 25faf0f4c094f56be93a2ab873675b9d7f6710d2..b27f69c40e4b5e0d971c28861aa3cc188d006ad5 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 3.5-dev (Asparagus)
--- DB_UPDATE_VERSION 1194
+-- DB_UPDATE_VERSION 1200
 -- ------------------------------------------
 
 
@@ -171,7 +171,8 @@ CREATE TABLE IF NOT EXISTS `contact` (
        `fetch_further_information` tinyint(1) NOT NULL DEFAULT 0,
        `ffi_keyword_blacklist` mediumtext NOT NULL,
         PRIMARY KEY(`id`),
-        INDEX `uid` (`uid`)
+        INDEX `uid` (`uid`),
+        INDEX `nurl` (`nurl`)
 ) DEFAULT CHARSET=utf8;
 
 --
@@ -201,17 +202,6 @@ CREATE TABLE IF NOT EXISTS `deliverq` (
         PRIMARY KEY(`id`)
 ) DEFAULT CHARSET=utf8;
 
---
--- TABLE dsprphotoq
---
-CREATE TABLE IF NOT EXISTS `dsprphotoq` (
-       `id` int(10) unsigned NOT NULL auto_increment,
-       `uid` int(11) NOT NULL DEFAULT 0,
-       `msg` mediumtext NOT NULL,
-       `attempt` tinyint(4) NOT NULL DEFAULT 0,
-        PRIMARY KEY(`id`)
-) DEFAULT CHARSET=utf8;
-
 --
 -- TABLE event
 --
@@ -244,6 +234,7 @@ CREATE TABLE IF NOT EXISTS `event` (
 --
 CREATE TABLE IF NOT EXISTS `fcontact` (
        `id` int(10) unsigned NOT NULL auto_increment,
+       `guid` varchar(255) NOT NULL DEFAULT '',
        `url` varchar(255) NOT NULL DEFAULT '',
        `name` varchar(255) NOT NULL DEFAULT '',
        `photo` varchar(255) NOT NULL DEFAULT '',
@@ -345,6 +336,9 @@ CREATE TABLE IF NOT EXISTS `gcontact` (
        `server_url` varchar(255) NOT NULL DEFAULT '',
         PRIMARY KEY(`id`),
         INDEX `nurl` (`nurl`),
+        INDEX `name` (`name`),
+        INDEX `nick` (`nick`),
+        INDEX `addr` (`addr`),
         INDEX `updated` (`updated`)
 ) DEFAULT CHARSET=utf8;
 
@@ -465,9 +459,11 @@ CREATE TABLE IF NOT EXISTS `item` (
        `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',
+       `owner-id` int(11) NOT NULL DEFAULT 0,
        `owner-name` varchar(255) NOT NULL DEFAULT '',
        `owner-link` varchar(255) NOT NULL DEFAULT '',
        `owner-avatar` varchar(255) NOT NULL DEFAULT '',
+       `author-id` int(11) NOT NULL DEFAULT 0,
        `author-name` varchar(255) NOT NULL DEFAULT '',
        `author-link` varchar(255) NOT NULL DEFAULT '',
        `author-avatar` varchar(255) NOT NULL DEFAULT '',
@@ -518,7 +514,7 @@ CREATE TABLE IF NOT EXISTS `item` (
         INDEX `extid` (`extid`),
         INDEX `uid_id` (`uid`,`id`),
         INDEX `uid_created` (`uid`,`created`),
-        INDEX `uid_unseen` (`uid`,`unseen`),
+        INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`),
         INDEX `uid_network_received` (`uid`,`network`,`received`),
         INDEX `uid_received` (`uid`,`received`),
         INDEX `uid_network_commented` (`uid`,`network`,`commented`),
@@ -526,15 +522,18 @@ CREATE TABLE IF NOT EXISTS `item` (
         INDEX `uid_title` (`uid`,`title`),
         INDEX `uid_thrparent` (`uid`,`thr-parent`),
         INDEX `uid_parenturi` (`uid`,`parent-uri`),
+        INDEX `uid_contactid_id` (`uid`,`contact-id`,`id`),
         INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
         INDEX `gcontactid_uid_created` (`gcontact-id`,`uid`,`created`),
+        INDEX `authorid_created` (`author-id`,`created`),
+        INDEX `ownerid_created` (`owner-id`,`created`),
         INDEX `wall_body` (`wall`,`body`(6)),
         INDEX `uid_visible_moderated_created` (`uid`,`visible`,`moderated`,`created`),
         INDEX `uid_uri` (`uid`,`uri`),
         INDEX `uid_wall_created` (`uid`,`wall`,`created`),
         INDEX `resource-id` (`resource-id`),
         INDEX `uid_type` (`uid`,`type`),
-        INDEX `uid_starred` (`uid`,`starred`),
+        INDEX `uid_starred_id` (`uid`,`starred`,`id`),
         INDEX `contactid_allowcid_allowpid_denycid_denygid` (`contact-id`,`allow_cid`(10),`allow_gid`(10),`deny_cid`(10),`deny_gid`(10)),
         INDEX `uid_wall_parent_created` (`uid`,`wall`,`parent`,`created`),
         INDEX `uid_type_changed` (`uid`,`type`,`changed`),
@@ -912,13 +911,11 @@ 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 DEFAULT 0,
-       `retract_iid` int(10) unsigned NOT NULL DEFAULT 0,
        `signed_text` mediumtext NOT NULL,
        `signature` text NOT NULL,
        `signer` varchar(255) NOT NULL DEFAULT '',
         PRIMARY KEY(`id`),
-        INDEX `iid` (`iid`),
-        INDEX `retract_iid` (`retract_iid`)
+        INDEX `iid` (`iid`)
 ) DEFAULT CHARSET=utf8;
 
 --
@@ -971,6 +968,8 @@ CREATE TABLE IF NOT EXISTS `thread` (
        `uid` int(10) unsigned NOT NULL DEFAULT 0,
        `contact-id` int(11) unsigned NOT NULL DEFAULT 0,
        `gcontact-id` int(11) unsigned NOT NULL DEFAULT 0,
+       `owner-id` int(11) unsigned NOT NULL DEFAULT 0,
+       `author-id` int(11) 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',