From: Michael <heluecht@pirati.ca>
Date: Sun, 12 Sep 2021 20:50:03 +0000 (+0000)
Subject: Deprecated fields
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0a01f0443e82e906d9cf3a8015cf7ea0d64c56ec;p=friendica.git

Deprecated fields
---

diff --git a/database.sql b/database.sql
index adbd5046a1..7e2a336aeb 100644
--- a/database.sql
+++ b/database.sql
@@ -153,7 +153,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
 	`poco` varchar(255) COMMENT '',
 	`aes_allow` boolean NOT NULL DEFAULT '0' COMMENT 'Deprecated',
 	`ret-aes` boolean NOT NULL DEFAULT '0' COMMENT 'Deprecated',
-	`usehub` boolean NOT NULL DEFAULT '0' COMMENT '',
+	`usehub` boolean NOT NULL DEFAULT '0' COMMENT 'Deprecated',
 	`subhub` boolean NOT NULL DEFAULT '0' COMMENT '',
 	`hub-verify` varchar(255) NOT NULL DEFAULT '' COMMENT '',
 	`last-update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last try to update the contact info',
@@ -185,7 +185,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
 	`baseurl` varchar(255) DEFAULT '' COMMENT 'baseurl of the contact',
 	`gsid` int unsigned COMMENT 'Global Server ID',
 	`reason` text COMMENT '',
-	`closeness` tinyint unsigned NOT NULL DEFAULT 99 COMMENT '',
+	`closeness` tinyint unsigned NOT NULL DEFAULT 99 COMMENT 'Deprecated',
 	`info` mediumtext COMMENT '',
 	`profile-id` int unsigned COMMENT 'Deprecated',
 	`bdyear` varchar(4) NOT NULL DEFAULT '' COMMENT '',
@@ -1516,11 +1516,16 @@ CREATE TABLE IF NOT EXISTS `user-contact` (
 	`blocked` boolean COMMENT 'Contact is completely blocked for this user',
 	`ignored` boolean COMMENT 'Posts from this contact are ignored',
 	`collapsed` boolean COMMENT 'Posts from this contact are collapsed',
+	`pending` boolean COMMENT '',
 	`rel` tinyint unsigned COMMENT 'The kind of the relation between the user and the contact',
 	`info` mediumtext COMMENT '',
 	`notify_new_posts` boolean COMMENT '',
+	`remote_self` boolean COMMENT '',
 	`fetch_further_information` tinyint unsigned COMMENT '',
 	`ffi_keyword_denylist` text COMMENT '',
+	`subhub` boolean COMMENT '',
+	`hub-verify` varchar(255) COMMENT '',
+	`protocol` char(4) COMMENT 'Protocol of the contact',
 	 PRIMARY KEY(`uid`,`cid`),
 	 INDEX `cid` (`cid`),
 	 UNIQUE INDEX `uri-id_uid` (`uri-id`,`uid`),
@@ -2255,7 +2260,6 @@ CREATE VIEW `owner-view` AS SELECT
 	`contact`.`poll` AS `poll`,
 	`contact`.`confirm` AS `confirm`,
 	`contact`.`poco` AS `poco`,
-	`contact`.`usehub` AS `usehub`,
 	`contact`.`subhub` AS `subhub`,
 	`contact`.`hub-verify` AS `hub-verify`,
 	`contact`.`last-update` AS `last-update`,
diff --git a/doc/database/db_contact.md b/doc/database/db_contact.md
index 8eeac17ea7..ab4e016db4 100644
--- a/doc/database/db_contact.md
+++ b/doc/database/db_contact.md
@@ -51,7 +51,7 @@ Fields
 | poco                      |                                                              | varchar(255)       | YES  |     | NULL                |                |
 | aes_allow                 | Deprecated                                                   | boolean            | NO   |     | 0                   |                |
 | ret-aes                   | Deprecated                                                   | boolean            | NO   |     | 0                   |                |
-| usehub                    |                                                              | boolean            | NO   |     | 0                   |                |
+| usehub                    | Deprecated                                                   | boolean            | NO   |     | 0                   |                |
 | subhub                    |                                                              | boolean            | NO   |     | 0                   |                |
 | hub-verify                |                                                              | varchar(255)       | NO   |     |                     |                |
 | last-update               | Date of the last try to update the contact info              | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
@@ -83,7 +83,7 @@ Fields
 | baseurl                   | baseurl of the contact                                       | varchar(255)       | YES  |     |                     |                |
 | gsid                      | Global Server ID                                             | int unsigned       | YES  |     | NULL                |                |
 | reason                    |                                                              | text               | YES  |     | NULL                |                |
-| closeness                 |                                                              | tinyint unsigned   | NO   |     | 99                  |                |
+| closeness                 | Deprecated                                                   | tinyint unsigned   | NO   |     | 99                  |                |
 | info                      |                                                              | mediumtext         | YES  |     | NULL                |                |
 | profile-id                | Deprecated                                                   | int unsigned       | YES  |     | NULL                |                |
 | bdyear                    |                                                              | varchar(4)         | NO   |     |                     |                |
diff --git a/doc/database/db_user-contact.md b/doc/database/db_user-contact.md
index aa74516f17..6726ac710d 100644
--- a/doc/database/db_user-contact.md
+++ b/doc/database/db_user-contact.md
@@ -14,11 +14,16 @@ Fields
 | blocked                   | Contact is completely blocked for this user                  | boolean            | YES  |     | NULL    |       |
 | ignored                   | Posts from this contact are ignored                          | boolean            | YES  |     | NULL    |       |
 | collapsed                 | Posts from this contact are collapsed                        | boolean            | YES  |     | NULL    |       |
+| pending                   |                                                              | boolean            | YES  |     | NULL    |       |
 | rel                       | The kind of the relation between the user and the contact    | tinyint unsigned   | YES  |     | NULL    |       |
 | info                      |                                                              | mediumtext         | YES  |     | NULL    |       |
 | notify_new_posts          |                                                              | boolean            | YES  |     | NULL    |       |
+| remote_self               |                                                              | boolean            | YES  |     | NULL    |       |
 | fetch_further_information |                                                              | tinyint unsigned   | YES  |     | NULL    |       |
 | ffi_keyword_denylist      |                                                              | text               | YES  |     | NULL    |       |
+| subhub                    |                                                              | boolean            | YES  |     | NULL    |       |
+| hub-verify                |                                                              | varchar(255)       | YES  |     | NULL    |       |
+| protocol                  | Protocol of the contact                                      | char(4)            | YES  |     | NULL    |       |
 
 Indexes
 ------------
diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php
index b501ea4df5..16143607fe 100644
--- a/static/dbstructure.config.php
+++ b/static/dbstructure.config.php
@@ -211,7 +211,7 @@ return [
 			"poco" => ["type" => "varchar(255)", "comment" => ""],
 			"aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
 			"ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
-			"usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+			"usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Deprecated"],
 			"subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
 			"hub-verify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
 			"last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
@@ -243,7 +243,7 @@ return [
 			"baseurl" => ["type" => "varchar(255)", "default" => "", "comment" => "baseurl of the contact"],
 			"gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id", "on delete" => "restrict"], "comment" => "Global Server ID"],
 			"reason" => ["type" => "text", "comment" => ""],
-			"closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => ""],
+			"closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => "Deprecated"],
 			"info" => ["type" => "mediumtext", "comment" => ""],
 			"profile-id" => ["type" => "int unsigned", "comment" => "Deprecated"],
 			"bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
@@ -1535,11 +1535,16 @@ return [
 			"blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
 			"ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
 			"collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"],
+			"pending" => ["type" => "boolean", "comment" => ""],
 			"rel" => ["type" => "tinyint unsigned", "comment" => "The kind of the relation between the user and the contact"],
 			"info" => ["type" => "mediumtext", "comment" => ""],
 			"notify_new_posts" => ["type" => "boolean", "comment" => ""],
+			"remote_self" => ["type" => "boolean", "comment" => ""],
 			"fetch_further_information" => ["type" => "tinyint unsigned", "comment" => ""],
 			"ffi_keyword_denylist" => ["type" => "text", "comment" => ""],
+			"subhub" => ["type" => "boolean", "comment" => ""],
+			"hub-verify" => ["type" => "varchar(255)", "comment" => ""],
+			"protocol" => ["type" => "char(4)", "comment" => "Protocol of the contact"],
 		],
 		"indexes" => [
 			"PRIMARY" => ["uid", "cid"],
diff --git a/static/dbview.config.php b/static/dbview.config.php
index c9acd55ba9..b64bbb2554 100644
--- a/static/dbview.config.php
+++ b/static/dbview.config.php
@@ -733,7 +733,6 @@
 			"poll" => ["contact", "poll"],
 			"confirm" => ["contact", "confirm"],
 			"poco" => ["contact", "poco"],
-			"usehub" => ["contact", "usehub"],
 			"subhub" => ["contact", "subhub"],
 			"hub-verify" => ["contact", "hub-verify"],
 			"last-update" => ["contact", "last-update"],