[Database] Structure version 1331

- Add profile_field table
This commit is contained in:
Hypolite Petovan 2019-11-07 22:09:19 -05:00
parent 62fec2f190
commit 6857d24995
2 changed files with 40 additions and 2 deletions

View file

@ -1,6 +1,6 @@
-- ------------------------------------------
-- Friendica 2020.03-dev (Dalmatian Bellflower)
-- DB_UPDATE_VERSION 1330
-- DB_UPDATE_VERSION 1331
-- ------------------------------------------
@ -1053,6 +1053,25 @@ CREATE TABLE IF NOT EXISTS `profile_check` (
PRIMARY KEY(`id`)
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='DFRN remote auth use';
--
-- TABLE profile_field
--
CREATE TABLE IF NOT EXISTS `profile_field` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'sequential ID',
`uid` mediumint(8) unsigned NOT NULL DEFAULT 0 COMMENT 'Owner user id',
`psid` int(10) unsigned DEFAULT NULL COMMENT 'ID of the permission set of this profile field - 0 = public',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Name of the field',
`value` text COMMENT 'Value of the field',
`order` mediumint(8) unsigned NOT NULL DEFAULT 1 COMMENT 'Field ordering per user',
`label` varchar(255) NOT NULL DEFAULT '' COMMENT 'Label of the field',
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '',
`edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '',
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `psid` (`psid`),
KEY `order` (`order`)
) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Custom profile fields';
--
-- TABLE push_subscriber
--

View file

@ -34,7 +34,7 @@
use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
define('DB_UPDATE_VERSION', 1330);
define('DB_UPDATE_VERSION', 1331);
}
return [
@ -1145,6 +1145,25 @@ return [
"PRIMARY" => ["id"],
]
],
"profile_field" => [
"comment" => "Custom profile fields",
"fields" => [
"id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
"uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner user id"],
"order" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "1", "comment" => "Field ordering per user"],
"psid" => ["type" => "int unsigned", "relation" => ["permissionset" => "id"], "comment" => "ID of the permission set of this profile field - 0 = public"],
"label" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Label of the field"],
"value" => ["type" => "text", "comment" => "Value of the field"],
"created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
"edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
],
"indexes" => [
"PRIMARY" => ["id"],
"uid" => ["uid"],
"order" => ["order"],
"psid" => ["psid"],
]
],
"push_subscriber" => [
"comment" => "Used for OStatus: Contains feed subscribers",
"fields" => [