-- ------------------------------------------
-- Friendica 3.6-dev (Asparagus)
--- DB_UPDATE_VERSION 1253
+-- DB_UPDATE_VERSION 1254
-- ------------------------------------------
--
CREATE TABLE IF NOT EXISTS `addon` (
`id` int NOT NULL auto_increment COMMENT '',
- `name` varchar(190) NOT NULL DEFAULT '' COMMENT '',
+ `name` varbinary(190) NOT NULL DEFAULT '' COMMENT '',
`version` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`installed` boolean NOT NULL DEFAULT '0' COMMENT '',
`hidden` boolean NOT NULL DEFAULT '0' COMMENT '',
`remote_self` boolean NOT NULL DEFAULT '0' COMMENT '',
`rel` tinyint NOT NULL DEFAULT 0 COMMENT '',
`duplex` boolean NOT NULL DEFAULT '0' COMMENT '',
- `network` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+ `network` char(4) NOT NULL DEFAULT '' COMMENT '',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`nick` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`location` varchar(255) NOT NULL DEFAULT '' COMMENT '',
INDEX `alias_uid` (`alias`(32),`uid`),
INDEX `pending_uid` (`pending`,`uid`),
INDEX `blocked_uid` (`blocked`,`uid`),
- INDEX `uid_rel_network_poll` (`uid`,`rel`,`network`(4),`poll`(64),`archive`),
- INDEX `uid_network_batch` (`uid`,`network`(4),`batch`(64)),
+ INDEX `uid_rel_network_poll` (`uid`,`rel`,`network`,`poll`(64),`archive`),
+ INDEX `uid_network_batch` (`uid`,`network`,`batch`(64)),
INDEX `addr_uid` (`addr`(32),`uid`),
INDEX `nurl_uid` (`nurl`(32),`uid`),
INDEX `nick_uid` (`nick`(32),`uid`),
`poll` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`confirm` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`priority` tinyint NOT NULL DEFAULT 0 COMMENT '',
- `network` varchar(32) NOT NULL DEFAULT '' COMMENT '',
+ `network` char(4) NOT NULL DEFAULT '' COMMENT '',
`alias` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`pubkey` text COMMENT '',
`updated` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '',
`contact-type` tinyint NOT NULL DEFAULT -1 COMMENT '',
`hide` boolean NOT NULL DEFAULT '0' COMMENT '',
`nsfw` boolean NOT NULL DEFAULT '0' COMMENT '',
- `network` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+ `network` char(4) NOT NULL DEFAULT '' COMMENT '',
`addr` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`notify` text COMMENT '',
`alias` varchar(255) NOT NULL DEFAULT '' COMMENT '',
INDEX `name` (`name`(64)),
INDEX `nick` (`nick`(32)),
INDEX `addr` (`addr`(64)),
- INDEX `hide_network_updated` (`hide`,`network`(4),`updated`),
+ INDEX `hide_network_updated` (`hide`,`network`,`updated`),
INDEX `updated` (`updated`)
) DEFAULT COLLATE utf8mb4_general_ci;
`registered-users` int NOT NULL DEFAULT 0 COMMENT '',
`poco` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`noscrape` varchar(255) NOT NULL DEFAULT '' COMMENT '',
- `network` varchar(32) NOT NULL DEFAULT '' COMMENT '',
+ `network` char(4) NOT NULL DEFAULT '' COMMENT '',
`platform` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '',
`last_poco_query` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '',
--
CREATE TABLE IF NOT EXISTS `hook` (
`id` int NOT NULL auto_increment COMMENT '',
- `hook` varchar(255) NOT NULL DEFAULT '' COMMENT '',
- `file` varchar(255) NOT NULL DEFAULT '' COMMENT '',
- `function` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+ `hook` varbinary(100) NOT NULL DEFAULT '' COMMENT '',
+ `file` varbinary(200) NOT NULL DEFAULT '' COMMENT '',
+ `function` varbinary(200) NOT NULL DEFAULT '' COMMENT '',
`priority` smallint NOT NULL DEFAULT 0 COMMENT '',
PRIMARY KEY(`id`),
- UNIQUE INDEX `hook_file_function` (`hook`(50),`file`(80),`function`(60))
+ UNIQUE INDEX `hook_file_function` (`hook`,`file`,`function`)
) DEFAULT COLLATE utf8mb4_general_ci;
--
`origin` boolean NOT NULL DEFAULT '0' COMMENT '',
`forum_mode` tinyint NOT NULL DEFAULT 0 COMMENT '',
`mention` boolean NOT NULL DEFAULT '0' COMMENT '',
- `network` varchar(32) NOT NULL DEFAULT '' COMMENT '',
+ `network` char(4) NOT NULL DEFAULT '' COMMENT '',
`rendered-hash` varchar(32) NOT NULL DEFAULT '' COMMENT '',
`rendered-html` mediumtext COMMENT '',
`global` boolean NOT NULL DEFAULT '0' COMMENT '',
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`(4),`received`),
- INDEX `uid_network_commented` (`uid`,`network`(4),`commented`),
+ INDEX `uid_network_received` (`uid`,`network`,`received`),
+ INDEX `uid_network_commented` (`uid`,`network`,`commented`),
INDEX `uid_thrparent` (`uid`,`thr-parent`(190)),
INDEX `uid_parenturi` (`uid`,`parent-uri`(190)),
INDEX `uid_contactid_created` (`uid`,`contact-id`,`created`),
CREATE TABLE IF NOT EXISTS `queue` (
`id` int NOT NULL auto_increment COMMENT '',
`cid` int NOT NULL DEFAULT 0 COMMENT 'Message receiver',
- `network` varchar(32) NOT NULL DEFAULT '' COMMENT 'Receiver\'s network',
+ `network` char(4) NOT NULL DEFAULT '' COMMENT 'Receiver\'s network',
`guid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Unique GUID of the message',
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date, when the message was created',
`last` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of last trial',
`origin` boolean NOT NULL DEFAULT '0' COMMENT '',
`forum_mode` tinyint NOT NULL DEFAULT 0 COMMENT '',
`mention` boolean NOT NULL DEFAULT '0' COMMENT '',
- `network` varchar(32) NOT NULL DEFAULT '' COMMENT '',
+ `network` char(4) NOT NULL DEFAULT '' COMMENT '',
PRIMARY KEY(`iid`),
INDEX `uid_network_commented` (`uid`,`network`,`commented`),
INDEX `uid_network_created` (`uid`,`network`,`created`),
"comment" => "registered addons",
"fields" => [
"id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
- "name" => ["type" => "varchar(190)", "not null" => "1", "default" => "", "comment" => ""],
+ "name" => ["type" => "varbinary(190)", "not null" => "1", "default" => "", "comment" => ""],
"version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"installed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
"hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
"remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
"rel" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
"duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "network" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
"name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"alias_uid" => ["alias(32)", "uid"],
"pending_uid" => ["pending", "uid"],
"blocked_uid" => ["blocked", "uid"],
- "uid_rel_network_poll" => ["uid", "rel", "network(4)", "poll(64)", "archive"],
- "uid_network_batch" => ["uid", "network(4)", "batch(64)"],
+ "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"],
+ "uid_network_batch" => ["uid", "network", "batch(64)"],
"addr_uid" => ["addr(32)", "uid"],
"nurl_uid" => ["nurl(32)", "uid"],
"nick_uid" => ["nick(32)", "uid"],
"poll" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"confirm" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"priority" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
- "network" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
"alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"pubkey" => ["type" => "text", "comment" => ""],
"updated" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
"contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "-1", "comment" => ""],
"hide" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
"nsfw" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "network" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
"addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"notify" => ["type" => "text", "comment" => ""],
"alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"name" => ["name(64)"],
"nick" => ["nick(32)"],
"addr" => ["addr(64)"],
- "hide_network_updated" => ["hide", "network(4)", "updated"],
+ "hide_network_updated" => ["hide", "network", "updated"],
"updated" => ["updated"],
]
];
"registered-users" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
"poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "network" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
"platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
"last_poco_query" => ["type" => "datetime", "default" => NULL_DATE, "comment" => ""],
"comment" => "addon hook registry",
"fields" => [
"id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
- "hook" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "file" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "function" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => ""],
+ "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => ""],
+ "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => ""],
"priority" => ["type" => "smallint", "not null" => "1", "default" => "0", "comment" => ""],
],
"indexes" => [
"PRIMARY" => ["id"],
- "hook_file_function" => ["UNIQUE", "hook(50)","file(80)","function(60)"],
+ "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
]
];
$database["intro"] = [
"origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
"forum_mode" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
"mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "network" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
"rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
"rendered-html" => ["type" => "mediumtext", "comment" => ""],
"global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
"uid_contactid_id" => ["uid","contact-id","id"],
"uid_created" => ["uid","created"],
"uid_unseen_contactid" => ["uid","unseen","contact-id"],
- "uid_network_received" => ["uid","network(4)","received"],
- "uid_network_commented" => ["uid","network(4)","commented"],
+ "uid_network_received" => ["uid","network","received"],
+ "uid_network_commented" => ["uid","network","commented"],
"uid_thrparent" => ["uid","thr-parent(190)"],
"uid_parenturi" => ["uid","parent-uri(190)"],
"uid_contactid_created" => ["uid","contact-id","created"],
"fields" => [
"id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
"cid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Message receiver"],
- "network" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Receiver's network"],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Receiver's network"],
"guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Unique GUID of the message"],
"created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => "Date, when the message was created"],
"last" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => "Date of last trial"],
"origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
"forum_mode" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
"mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "network" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
],
"indexes" => [
"PRIMARY" => ["iid"],