-- ------------------------------------------
+--
+-- TABLE gserver
+--
+CREATE TABLE IF NOT EXISTS `gserver` (
+ `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID',
+ `url` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+ `nurl` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+ `version` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+ `site_name` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+ `info` text COMMENT '',
+ `register_policy` tinyint NOT NULL DEFAULT 0 COMMENT '',
+ `registered-users` int unsigned NOT NULL DEFAULT 0 COMMENT 'Number of registered users',
+ `directory-type` tinyint DEFAULT 0 COMMENT 'Type of directory service (Poco, Mastodon)',
+ `poco` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+ `noscrape` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+ `network` char(4) NOT NULL DEFAULT '' COMMENT '',
+ `platform` varchar(255) NOT NULL DEFAULT '' COMMENT '',
+ `relay-subscribe` boolean NOT NULL DEFAULT '0' COMMENT 'Has the server subscribed to the relay system',
+ `relay-scope` varchar(10) NOT NULL DEFAULT '' COMMENT 'The scope of messages that the server wants to get',
+ `detection-method` tinyint unsigned COMMENT 'Method that had been used to detect that server',
+ `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '',
+ `last_poco_query` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '',
+ `last_contact` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '',
+ `last_failure` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '',
+ PRIMARY KEY(`id`),
+ UNIQUE INDEX `nurl` (`nurl`(190))
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Global servers';
+
--
-- TABLE clients
--
UNIQUE INDEX `gid_contactid` (`gid`,`contact-id`)
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy groups, member info';
---
--- TABLE gserver
---
-CREATE TABLE IF NOT EXISTS `gserver` (
- `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID',
- `url` varchar(255) NOT NULL DEFAULT '' COMMENT '',
- `nurl` varchar(255) NOT NULL DEFAULT '' COMMENT '',
- `version` varchar(255) NOT NULL DEFAULT '' COMMENT '',
- `site_name` varchar(255) NOT NULL DEFAULT '' COMMENT '',
- `info` text COMMENT '',
- `register_policy` tinyint NOT NULL DEFAULT 0 COMMENT '',
- `registered-users` int unsigned NOT NULL DEFAULT 0 COMMENT 'Number of registered users',
- `directory-type` tinyint DEFAULT 0 COMMENT 'Type of directory service (Poco, Mastodon)',
- `poco` varchar(255) NOT NULL DEFAULT '' COMMENT '',
- `noscrape` varchar(255) NOT NULL DEFAULT '' COMMENT '',
- `network` char(4) NOT NULL DEFAULT '' COMMENT '',
- `platform` varchar(255) NOT NULL DEFAULT '' COMMENT '',
- `relay-subscribe` boolean NOT NULL DEFAULT '0' COMMENT 'Has the server subscribed to the relay system',
- `relay-scope` varchar(10) NOT NULL DEFAULT '' COMMENT 'The scope of messages that the server wants to get',
- `detection-method` tinyint unsigned COMMENT 'Method that had been used to detect that server',
- `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '',
- `last_poco_query` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '',
- `last_contact` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '',
- `last_failure` datetime DEFAULT '0001-01-01 00:00:00' COMMENT '',
- PRIMARY KEY(`id`),
- UNIQUE INDEX `nurl` (`nurl`(190))
-) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Global servers';
-
--
-- TABLE gserver-tag
--
return [
// Side tables
+ "gserver" => [
+ "comment" => "Global servers",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "info" => ["type" => "text", "comment" => ""],
+ "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+ "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
+ "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"],
+ "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
+ "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"],
+ "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"],
+ "detection-method" => ["type" => "tinyint unsigned", "comment" => "Method that had been used to detect that server"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "last_poco_query" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "nurl" => ["UNIQUE", "nurl(190)"],
+ ]
+ ],
"clients" => [
"comment" => "OAuth usage",
"fields" => [
"gid_contactid" => ["UNIQUE", "gid", "contact-id"],
]
],
- "gserver" => [
- "comment" => "Global servers",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "info" => ["type" => "text", "comment" => ""],
- "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
- "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
- "directory-type" => ["type" => "tinyint", "default" => "0", "comment" => "Type of directory service (Poco, Mastodon)"],
- "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
- "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"],
- "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"],
- "detection-method" => ["type" => "tinyint unsigned", "comment" => "Method that had been used to detect that server"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "last_poco_query" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "nurl" => ["UNIQUE", "nurl(190)"],
- ]
- ],
"gserver-tag" => [
"comment" => "Tags that the server has subscribed",
"fields" => [