X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=database.sql;h=2e83c33a643dea97b59026a69929df8d2727903f;hb=55ee80338f4e02f9330bfcccccee6ea6e3e2036a;hp=f12746e7e53b5b598b99df84207f06dcf00dafee;hpb=1218e2f88581a3051225318cb7851a0b75a4b0b3;p=friendica.git diff --git a/database.sql b/database.sql index f12746e7e5..2e83c33a64 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 3.5.1-dev (Asparagus) --- DB_UPDATE_VERSION 1205 +-- DB_UPDATE_VERSION 1211 -- ------------------------------------------ @@ -54,12 +54,13 @@ CREATE TABLE IF NOT EXISTS `auth_codes` ( -- TABLE cache -- CREATE TABLE IF NOT EXISTS `cache` ( - `k` varchar(255) NOT NULL, + `k` varbinary(255) NOT NULL, `v` text, `expire_mode` int(11) NOT NULL DEFAULT 0, `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY(`k`(191)), - INDEX `updated` (`updated`) + PRIMARY KEY(`k`), + INDEX `updated` (`updated`), + INDEX `expire_mode_updated` (`expire_mode`,`updated`) ) DEFAULT CHARSET=utf8mb4; -- @@ -93,11 +94,11 @@ CREATE TABLE IF NOT EXISTS `clients` ( -- CREATE TABLE IF NOT EXISTS `config` ( `id` int(10) unsigned NOT NULL auto_increment, - `cat` varchar(255) NOT NULL DEFAULT '', - `k` varchar(255) NOT NULL DEFAULT '', + `cat` varbinary(255) NOT NULL DEFAULT '', + `k` varbinary(255) NOT NULL DEFAULT '', `v` text, PRIMARY KEY(`id`), - UNIQUE INDEX `cat_k` (`cat`(30),`k`(30)) + UNIQUE INDEX `cat_k` (`cat`,`k`) ) DEFAULT CHARSET=utf8mb4; -- @@ -174,6 +175,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( `ffi_keyword_blacklist` mediumtext, PRIMARY KEY(`id`), INDEX `uid` (`uid`), + INDEX `addr_uid` (`addr`,`uid`), INDEX `nurl` (`nurl`) ) DEFAULT CHARSET=utf8mb4; @@ -198,10 +200,11 @@ CREATE TABLE IF NOT EXISTS `conv` ( -- CREATE TABLE IF NOT EXISTS `deliverq` ( `id` int(10) unsigned NOT NULL auto_increment, - `cmd` varchar(32) NOT NULL DEFAULT '', + `cmd` varbinary(32) NOT NULL DEFAULT '', `item` int(11) NOT NULL DEFAULT 0, `contact` int(11) NOT NULL DEFAULT 0, - PRIMARY KEY(`id`) + PRIMARY KEY(`id`), + UNIQUE INDEX `cmd_item_contact` (`cmd`,`item`,`contact`) ) DEFAULT CHARSET=utf8mb4; -- @@ -209,6 +212,7 @@ CREATE TABLE IF NOT EXISTS `deliverq` ( -- CREATE TABLE IF NOT EXISTS `event` ( `id` int(11) NOT NULL auto_increment, + `guid` varchar(255) NOT NULL DEFAULT '', `uid` int(11) NOT NULL DEFAULT 0, `cid` int(11) NOT NULL DEFAULT 0, `uri` varchar(255) NOT NULL DEFAULT '', @@ -655,6 +659,8 @@ CREATE TABLE IF NOT EXISTS `notify` ( `seen` tinyint(1) NOT NULL DEFAULT 0, `verb` varchar(255) NOT NULL DEFAULT '', `otype` varchar(16) NOT NULL DEFAULT '', + `name_cache` tinytext, + `msg_cache` mediumtext, PRIMARY KEY(`id`), INDEX `uid` (`uid`) ) DEFAULT CHARSET=utf8mb4; @@ -677,10 +683,10 @@ CREATE TABLE IF NOT EXISTS `notify-threads` ( -- TABLE oembed -- CREATE TABLE IF NOT EXISTS `oembed` ( - `url` varchar(255) NOT NULL, + `url` varbinary(255) NOT NULL, `content` text, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY(`url`(191)), + PRIMARY KEY(`url`), INDEX `created` (`created`) ) DEFAULT CHARSET=utf8mb4; @@ -688,12 +694,12 @@ CREATE TABLE IF NOT EXISTS `oembed` ( -- TABLE parsed_url -- CREATE TABLE IF NOT EXISTS `parsed_url` ( - `url` varchar(255) NOT NULL, + `url` varbinary(255) NOT NULL, `guessing` tinyint(1) NOT NULL DEFAULT 0, `oembed` tinyint(1) NOT NULL DEFAULT 0, `content` text, `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY(`url`(191),`guessing`,`oembed`), + PRIMARY KEY(`url`,`guessing`,`oembed`), INDEX `created` (`created`) ) DEFAULT CHARSET=utf8mb4; @@ -703,11 +709,11 @@ CREATE TABLE IF NOT EXISTS `parsed_url` ( CREATE TABLE IF NOT EXISTS `pconfig` ( `id` int(11) NOT NULL auto_increment, `uid` int(11) NOT NULL DEFAULT 0, - `cat` varchar(255) NOT NULL DEFAULT '', - `k` varchar(255) NOT NULL DEFAULT '', + `cat` varbinary(255) NOT NULL DEFAULT '', + `k` varbinary(255) NOT NULL DEFAULT '', `v` mediumtext, PRIMARY KEY(`id`), - UNIQUE INDEX `uid_cat_k` (`uid`,`cat`(30),`k`(30)) + UNIQUE INDEX `uid_cat_k` (`uid`,`cat`,`k`) ) DEFAULT CHARSET=utf8mb4; -- @@ -737,7 +743,9 @@ CREATE TABLE IF NOT EXISTS `photo` ( `deny_cid` mediumtext, `deny_gid` mediumtext, PRIMARY KEY(`id`), - INDEX `uid` (`uid`), + INDEX `uid_contactid` (`uid`,`contact-id`), + INDEX `uid_profile` (`uid`,`profile`), + INDEX `uid_album_created` (`uid`,`album`,`created`), INDEX `resource-id` (`resource-id`), INDEX `guid` (`guid`) ) DEFAULT CHARSET=utf8mb4; @@ -779,7 +787,7 @@ CREATE TABLE IF NOT EXISTS `poll_result` ( -- CREATE TABLE IF NOT EXISTS `process` ( `pid` int(10) unsigned NOT NULL, - `command` varchar(32) NOT NULL DEFAULT '', + `command` varbinary(32) NOT NULL DEFAULT '', `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY(`pid`), INDEX `command` (`command`) @@ -892,6 +900,7 @@ CREATE TABLE IF NOT EXISTS `register` ( `uid` int(11) unsigned NOT NULL DEFAULT 0, `password` varchar(255) NOT NULL DEFAULT '', `language` varchar(16) NOT NULL DEFAULT '', + `note` text, PRIMARY KEY(`id`) ) DEFAULT CHARSET=utf8mb4; @@ -912,7 +921,7 @@ CREATE TABLE IF NOT EXISTS `search` ( -- CREATE TABLE IF NOT EXISTS `session` ( `id` bigint(20) unsigned NOT NULL auto_increment, - `sid` varchar(255) NOT NULL DEFAULT '', + `sid` varbinary(255) NOT NULL DEFAULT '', `data` text, `expire` int(10) unsigned NOT NULL DEFAULT 0, PRIMARY KEY(`id`), @@ -972,6 +981,7 @@ CREATE TABLE IF NOT EXISTS `term` ( INDEX `type_term` (`type`,`term`), INDEX `uid_otype_type_term_global_created` (`uid`,`otype`,`type`,`term`,`global`,`created`), INDEX `otype_type_term_tid` (`otype`,`type`,`term`,`tid`), + INDEX `uid_otype_type_url` (`uid`,`otype`,`type`,`url`), INDEX `guid` (`guid`) ) DEFAULT CHARSET=utf8mb4;