X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=database.sql;h=e4e891e482080b0b12d3349604ee6c4340d86bb2;hb=7de3eae8d0c13dfa7671c3ebc1a07bbfc79499ef;hp=c8010e1e20f0e449a4deb61dbc2aea91f4ee5a5f;hpb=35dc56c9c25f30823ff1cfbefe8ea9eab47cc6ee;p=friendica.git diff --git a/database.sql b/database.sql index c8010e1e20..e4e891e482 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ --- Friendica 3.5.2-dev (Asparagus) --- DB_UPDATE_VERSION 1220 +-- Friendica 3.6-dev (Asparagus) +-- DB_UPDATE_VERSION 1235 -- ------------------------------------------ @@ -184,8 +184,8 @@ CREATE TABLE IF NOT EXISTS `contact` ( INDEX `addr_uid` (`addr`(32),`uid`), INDEX `nurl_uid` (`nurl`(32),`uid`), INDEX `nick_uid` (`nick`(32),`uid`), - INDEX `dfrn-id` (`dfrn-id`), - INDEX `issued-id` (`issued-id`) + INDEX `dfrn-id` (`dfrn-id`(64)), + INDEX `issued-id` (`issued-id`(64)) ) DEFAULT COLLATE utf8mb4_general_ci; -- @@ -193,7 +193,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( -- CREATE TABLE IF NOT EXISTS `conv` ( `id` int(10) unsigned NOT NULL auto_increment, - `guid` varchar(64) NOT NULL DEFAULT '', + `guid` varchar(255) NOT NULL DEFAULT '', `recips` text, `uid` int(11) NOT NULL DEFAULT 0, `creator` varchar(255) NOT NULL DEFAULT '', @@ -270,7 +270,7 @@ CREATE TABLE IF NOT EXISTS `fcontact` ( `updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', PRIMARY KEY(`id`), INDEX `addr` (`addr`(32)), - INDEX `url` (`url`) + UNIQUE INDEX `url` (`url`(190)) ) DEFAULT COLLATE utf8mb4_general_ci; -- @@ -355,7 +355,7 @@ CREATE TABLE IF NOT EXISTS `gcontact` ( `generation` tinyint(3) NOT NULL DEFAULT 0, `server_url` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY(`id`), - INDEX `nurl` (`nurl`(64)), + UNIQUE INDEX `nurl` (`nurl`(190)), INDEX `name` (`name`(64)), INDEX `nick` (`nick`(32)), INDEX `addr` (`addr`(64)), @@ -425,7 +425,7 @@ CREATE TABLE IF NOT EXISTS `gserver` ( `last_contact` datetime DEFAULT '0001-01-01 00:00:00', `last_failure` datetime DEFAULT '0001-01-01 00:00:00', PRIMARY KEY(`id`), - INDEX `nurl` (`nurl`(32)) + UNIQUE INDEX `nurl` (`nurl`(190)) ) DEFAULT COLLATE utf8mb4_general_ci; -- @@ -529,11 +529,11 @@ CREATE TABLE IF NOT EXISTS `item` ( `rendered-html` mediumtext, `global` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY(`id`), - INDEX `guid` (`guid`), - INDEX `uri` (`uri`), + INDEX `guid` (`guid`(191)), + INDEX `uri` (`uri`(191)), INDEX `parent` (`parent`), - INDEX `parent-uri` (`parent-uri`), - INDEX `extid` (`extid`), + INDEX `parent-uri` (`parent-uri`(191)), + INDEX `extid` (`extid`(191)), INDEX `uid_id` (`uid`,`id`), INDEX `uid_contactid_id` (`uid`,`contact-id`,`id`), INDEX `uid_created` (`uid`,`created`), @@ -544,8 +544,9 @@ CREATE TABLE IF NOT EXISTS `item` ( INDEX `uid_parenturi` (`uid`,`parent-uri`(190)), INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`), INDEX `authorid_created` (`author-id`,`created`), + INDEX `ownerid` (`owner-id`), INDEX `uid_uri` (`uid`,`uri`(190)), - INDEX `resource-id` (`resource-id`), + INDEX `resource-id` (`resource-id`(191)), INDEX `contactid_allowcid_allowpid_denycid_denygid` (`contact-id`,`allow_cid`(10),`allow_gid`(10),`deny_cid`(10),`deny_gid`(10)), INDEX `uid_type_changed` (`uid`,`type`(190),`changed`), INDEX `contactid_verb` (`contact-id`,`verb`(190)), @@ -567,7 +568,7 @@ CREATE TABLE IF NOT EXISTS `item_id` ( `service` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY(`id`), INDEX `uid` (`uid`), - INDEX `sid` (`sid`), + INDEX `sid` (`sid`(32)), INDEX `service` (`service`(32)), INDEX `iid` (`iid`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -579,7 +580,7 @@ CREATE TABLE IF NOT EXISTS `locks` ( `id` int(11) NOT NULL auto_increment, `name` varchar(128) NOT NULL DEFAULT '', `locked` tinyint(1) NOT NULL DEFAULT 0, - `created` datetime DEFAULT '0001-01-01 00:00:00', + `pid` int(10) unsigned NOT NULL DEFAULT 0, PRIMARY KEY(`id`) ) DEFAULT COLLATE utf8mb4_general_ci; @@ -589,7 +590,7 @@ CREATE TABLE IF NOT EXISTS `locks` ( CREATE TABLE IF NOT EXISTS `mail` ( `id` int(10) unsigned NOT NULL auto_increment, `uid` int(10) unsigned NOT NULL DEFAULT 0, - `guid` varchar(64) NOT NULL DEFAULT '', + `guid` varchar(255) NOT NULL DEFAULT '', `from-name` varchar(255) NOT NULL DEFAULT '', `from-photo` varchar(255) NOT NULL DEFAULT '', `from-url` varchar(255) NOT NULL DEFAULT '', @@ -608,7 +609,8 @@ CREATE TABLE IF NOT EXISTS `mail` ( INDEX `uid_seen` (`uid`,`seen`), INDEX `convid` (`convid`), INDEX `uri` (`uri`(64)), - INDEX `parent-uri` (`parent-uri`(64)) + INDEX `parent-uri` (`parent-uri`(64)), + INDEX `contactid` (`contact-id`(32)) ) DEFAULT COLLATE utf8mb4_general_ci; -- @@ -746,6 +748,7 @@ CREATE TABLE IF NOT EXISTS `photo` ( `deny_cid` mediumtext, `deny_gid` mediumtext, PRIMARY KEY(`id`), + INDEX `contactid` (`contact-id`), INDEX `uid_contactid` (`uid`,`contact-id`), INDEX `uid_profile` (`uid`,`profile`), INDEX `uid_album_scale_created` (`uid`,`album`(32),`scale`,`created`), @@ -941,7 +944,7 @@ CREATE TABLE IF NOT EXISTS `sign` ( `signature` text, `signer` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY(`id`), - INDEX `iid` (`iid`) + UNIQUE INDEX `iid` (`iid`) ) DEFAULT COLLATE utf8mb4_general_ci; -- @@ -958,7 +961,7 @@ CREATE TABLE IF NOT EXISTS `spam` ( INDEX `uid` (`uid`), INDEX `spam` (`spam`), INDEX `ham` (`ham`), - INDEX `term` (`term`) + INDEX `term` (`term`(32)) ) DEFAULT COLLATE utf8mb4_general_ci; -- @@ -1019,9 +1022,13 @@ CREATE TABLE IF NOT EXISTS `thread` ( INDEX `uid_network_created` (`uid`,`network`,`created`), INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`), INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`), + INDEX `contactid` (`contact-id`), + INDEX `ownerid` (`owner-id`), + INDEX `authorid` (`author-id`), INDEX `uid_created` (`uid`,`created`), INDEX `uid_commented` (`uid`,`commented`), - INDEX `uid_wall_created` (`uid`,`wall`,`created`) + INDEX `uid_wall_created` (`uid`,`wall`,`created`), + INDEX `private_wall_received` (`private`,`wall`,`received`) ) DEFAULT COLLATE utf8mb4_general_ci; -- @@ -1077,7 +1084,6 @@ CREATE TABLE IF NOT EXISTS `user` ( `account_expired` tinyint(1) NOT NULL DEFAULT 0, `account_expires_on` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', `expire_notification_sent` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', - `service_class` varchar(32) NOT NULL DEFAULT '', `def_gid` int(11) NOT NULL DEFAULT 0, `allow_cid` mediumtext, `allow_gid` mediumtext, @@ -1108,6 +1114,11 @@ CREATE TABLE IF NOT EXISTS `workerqueue` ( `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', `pid` int(11) NOT NULL DEFAULT 0, `executed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', - PRIMARY KEY(`id`) + `done` tinyint(1) NOT NULL DEFAULT 0, + PRIMARY KEY(`id`), + INDEX `pid` (`pid`), + INDEX `parameter` (`parameter`(64)), + INDEX `priority_created` (`priority`,`created`), + INDEX `executed` (`executed`) ) DEFAULT COLLATE utf8mb4_general_ci;