add the homepage_verified field to the profile table and the owner-view

This commit is contained in:
Tobias Diekershoff 2022-11-05 15:37:13 +01:00
parent 028d823d96
commit a98d321376
4 changed files with 52 additions and 47 deletions

View file

@ -1,6 +1,6 @@
-- ------------------------------------------ -- ------------------------------------------
-- Friendica 2022.12-dev (Giant Rhubarb) -- Friendica 2022.12-dev (Giant Rhubarb)
-- DB_UPDATE_VERSION 1486 -- DB_UPDATE_VERSION 1487
-- ------------------------------------------ -- ------------------------------------------
@ -1577,6 +1577,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
`education` text COMMENT 'Deprecated', `education` text COMMENT 'Deprecated',
`contact` text COMMENT 'Deprecated', `contact` text COMMENT 'Deprecated',
`homepage` varchar(255) NOT NULL DEFAULT '' COMMENT '', `homepage` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`homepage_verified` boolean NOT NULL DEFAULT '0' COMMENT 'was the homepage verified by a rel-me link back to the profile',
`xmpp` varchar(255) NOT NULL DEFAULT '' COMMENT 'XMPP address', `xmpp` varchar(255) NOT NULL DEFAULT '' COMMENT 'XMPP address',
`matrix` varchar(255) NOT NULL DEFAULT '' COMMENT 'Matrix address', `matrix` varchar(255) NOT NULL DEFAULT '' COMMENT 'Matrix address',
`photo` varbinary(383) NOT NULL DEFAULT '' COMMENT '', `photo` varbinary(383) NOT NULL DEFAULT '' COMMENT '',
@ -2674,6 +2675,7 @@ CREATE VIEW `owner-view` AS SELECT
`profile`.`postal-code` AS `postal-code`, `profile`.`postal-code` AS `postal-code`,
`profile`.`country-name` AS `country-name`, `profile`.`country-name` AS `country-name`,
`profile`.`homepage` AS `homepage`, `profile`.`homepage` AS `homepage`,
`profile`.`homepage_verified` AS `homepage_verified`,
`profile`.`dob` AS `dob` `profile`.`dob` AS `dob`
FROM `user` FROM `user`
INNER JOIN `contact` ON `contact`.`uid` = `user`.`uid` AND `contact`.`self` INNER JOIN `contact` ON `contact`.`uid` = `user`.`uid` AND `contact`.`self`

View file

@ -7,7 +7,7 @@ Fields
------ ------
| Field | Description | Type | Null | Key | Default | Extra | | Field | Description | Type | Null | Key | Default | Extra |
| ------------ | --------------------------------------------- | ------------------ | ---- | --- | ---------- | -------------- | | ----------------- | -------------------------------------------------------------- | ------------------ | ---- | --- | ---------- | -------------- |
| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment |
| uid | Owner User id | mediumint unsigned | NO | | 0 | | | uid | Owner User id | mediumint unsigned | NO | | 0 | |
| profile-name | Deprecated | varchar(255) | YES | | NULL | | | profile-name | Deprecated | varchar(255) | YES | | NULL | |
@ -45,6 +45,7 @@ Fields
| education | Deprecated | text | YES | | NULL | | | education | Deprecated | text | YES | | NULL | |
| contact | Deprecated | text | YES | | NULL | | | contact | Deprecated | text | YES | | NULL | |
| homepage | | varchar(255) | NO | | | | | homepage | | varchar(255) | NO | | | |
| homepage_verified | was the homepage verified by a rel-me link back to the profile | boolean | NO | | 0 | |
| xmpp | XMPP address | varchar(255) | NO | | | | | xmpp | XMPP address | varchar(255) | NO | | | |
| matrix | Matrix address | varchar(255) | NO | | | | | matrix | Matrix address | varchar(255) | NO | | | |
| photo | | varbinary(383) | NO | | | | | photo | | varbinary(383) | NO | | | |

View file

@ -55,7 +55,7 @@
use Friendica\Database\DBA; use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) { if (!defined('DB_UPDATE_VERSION')) {
define('DB_UPDATE_VERSION', 1486); define('DB_UPDATE_VERSION', 1487);
} }
return [ return [
@ -1580,6 +1580,7 @@ return [
"education" => ["type" => "text", "comment" => "Deprecated"], "education" => ["type" => "text", "comment" => "Deprecated"],
"contact" => ["type" => "text", "comment" => "Deprecated"], "contact" => ["type" => "text", "comment" => "Deprecated"],
"homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
"homepage_verified" => ["type" => "boolean", "not null" => 1, "default" => "0", "comment" => "was the homepage verified by a rel-me link back to the profile"],
"xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"], "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "XMPP address"],
"matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"], "matrix" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Matrix address"],
"photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""], "photo" => ["type" => "varbinary(383)", "not null" => "1", "default" => "", "comment" => ""],

View file

@ -919,6 +919,7 @@
"postal-code" => ["profile", "postal-code"], "postal-code" => ["profile", "postal-code"],
"country-name" => ["profile", "country-name"], "country-name" => ["profile", "country-name"],
"homepage" => ["profile", "homepage"], "homepage" => ["profile", "homepage"],
"homepage_verified" => ["profile", "homepage_verified"],
"dob" => ["profile", "dob"], "dob" => ["profile", "dob"],
], ],
"query" => "FROM `user` "query" => "FROM `user`