]> git.mxchange.org Git - friendica.git/blobdiff - database.sql
Merge remote-tracking branch 'upstream/develop' into 1601-api-statuses-lookup
[friendica.git] / database.sql
index 9d4d289f2fa52efc735ebbbba4599dc69dd2ec9d..b133489e4e3e6b8cf224b045914d5f1fdbe297c7 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
--- Friendica 3.5.1-dev (Asparagus)
--- DB_UPDATE_VERSION 1212
+-- Friendica 3.5.1-rc (Asparagus)
+-- DB_UPDATE_VERSION 1215
 -- ------------------------------------------
 
 
@@ -9,13 +9,14 @@
 --
 CREATE TABLE IF NOT EXISTS `addon` (
        `id` int(11) NOT NULL auto_increment,
-       `name` varchar(255) NOT NULL DEFAULT '',
+       `name` varchar(190) NOT NULL DEFAULT '',
        `version` varchar(255) NOT NULL DEFAULT '',
        `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`),
+        UNIQUE INDEX `name` (`name`)
 ) DEFAULT CHARSET=utf8mb4;
 
 --
@@ -31,10 +32,10 @@ CREATE TABLE IF NOT EXISTS `attach` (
        `data` longblob NOT NULL,
        `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
        `edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-       `allow_cid` text,
-       `allow_gid` text,
-       `deny_cid` text,
-       `deny_gid` text,
+       `allow_cid` mediumtext,
+       `allow_gid` mediumtext,
+       `deny_cid` mediumtext,
+       `deny_gid` mediumtext,
         PRIMARY KEY(`id`)
 ) DEFAULT CHARSET=utf8mb4;
 
@@ -235,10 +236,10 @@ CREATE TABLE IF NOT EXISTS `event` (
        `nofinish` tinyint(1) NOT NULL DEFAULT 0,
        `adjust` tinyint(1) NOT NULL DEFAULT 1,
        `ignore` tinyint(1) unsigned NOT NULL DEFAULT 0,
-       `allow_cid` text,
-       `allow_gid` text,
-       `deny_cid` text,
-       `deny_gid` text,
+       `allow_cid` mediumtext,
+       `allow_gid` mediumtext,
+       `deny_cid` mediumtext,
+       `deny_gid` mediumtext,
         PRIMARY KEY(`id`),
         INDEX `uid_start` (`uid`,`start`)
 ) DEFAULT CHARSET=utf8mb4;
@@ -351,10 +352,10 @@ 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`(32)),
-        INDEX `name` (`name`(32)),
+        INDEX `nurl` (`nurl`(64)),
+        INDEX `name` (`name`(64)),
         INDEX `nick` (`nick`(32)),
-        INDEX `addr` (`addr`(32)),
+        INDEX `addr` (`addr`(64)),
         INDEX `hide_network_updated` (`hide`,`network`,`updated`),
         INDEX `updated` (`updated`)
 ) DEFAULT CHARSET=utf8mb4;
@@ -434,7 +435,7 @@ CREATE TABLE IF NOT EXISTS `hook` (
        `function` varchar(255) NOT NULL DEFAULT '',
        `priority` int(11) unsigned NOT NULL DEFAULT 0,
         PRIMARY KEY(`id`),
-        INDEX `hook_file_function` (`hook`(30),`file`(60),`function`(30))
+        UNIQUE INDEX `hook_file_function` (`hook`(50),`file`(80),`function`(60))
 ) DEFAULT CHARSET=utf8mb4;
 
 --
@@ -531,6 +532,7 @@ CREATE TABLE IF NOT EXISTS `item` (
         INDEX `parent-uri` (`parent-uri`),
         INDEX `extid` (`extid`),
         INDEX `uid_id` (`uid`,`id`),
+        INDEX `uid_contactid_id` (`uid`,`contact-id`,`id`),
         INDEX `uid_created` (`uid`,`created`),
         INDEX `uid_unseen_contactid` (`uid`,`unseen`,`contact-id`),
         INDEX `uid_network_received` (`uid`,`network`,`received`),
@@ -1015,7 +1017,8 @@ CREATE TABLE IF NOT EXISTS `thread` (
         INDEX `uid_contactid_commented` (`uid`,`contact-id`,`commented`),
         INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
         INDEX `uid_created` (`uid`,`created`),
-        INDEX `uid_commented` (`uid`,`commented`)
+        INDEX `uid_commented` (`uid`,`commented`),
+        INDEX `uid_wall_created` (`uid`,`wall`,`created`)
 ) DEFAULT CHARSET=utf8mb4;
 
 --
@@ -1073,10 +1076,10 @@ CREATE TABLE IF NOT EXISTS `user` (
        `expire_notification_sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
        `service_class` varchar(32) NOT NULL DEFAULT '',
        `def_gid` int(11) NOT NULL DEFAULT 0,
-       `allow_cid` text,
-       `allow_gid` text,
-       `deny_cid` text,
-       `deny_gid` text,
+       `allow_cid` mediumtext,
+       `allow_gid` mediumtext,
+       `deny_cid` mediumtext,
+       `deny_gid` mediumtext,
        `openidserver` text,
         PRIMARY KEY(`uid`),
         INDEX `nickname` (`nickname`(32))