From cc0b16c0aec5711a2527f5420f73415f2093010f Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 11 Jan 2024 07:01:48 +0000 Subject: [PATCH] Fix a problem with MySQL --- database.sql | 2 +- doc/database/db_post-engagement.md | 2 +- static/dbstructure.config.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/database.sql b/database.sql index 813c14a994..51df6a732c 100644 --- a/database.sql +++ b/database.sql @@ -1345,7 +1345,7 @@ CREATE TABLE IF NOT EXISTS `post-engagement` ( `owner-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Item owner', `contact-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Person, organisation, news, community, relay', `media-type` tinyint NOT NULL DEFAULT 0 COMMENT 'Type of media in a bit array (1 = image, 2 = video, 4 = audio', - `language` varbinary(128) COMMENT 'Language information about this post', + `language` varchar(128) COMMENT 'Language information about this post', `searchtext` mediumtext COMMENT 'Simplified text for the full text search', `created` datetime COMMENT '', `restricted` boolean NOT NULL DEFAULT '0' COMMENT 'If true, this post is either unlisted or not from a federated network', diff --git a/doc/database/db_post-engagement.md b/doc/database/db_post-engagement.md index edca447f3d..e63f170b76 100644 --- a/doc/database/db_post-engagement.md +++ b/doc/database/db_post-engagement.md @@ -12,7 +12,7 @@ Fields | owner-id | Item owner | int unsigned | NO | | 0 | | | contact-type | Person, organisation, news, community, relay | tinyint | NO | | 0 | | | media-type | Type of media in a bit array (1 = image, 2 = video, 4 = audio | tinyint | NO | | 0 | | -| language | Language information about this post | varbinary(128) | YES | | NULL | | +| language | Language information about this post | varchar(128) | YES | | NULL | | | searchtext | Simplified text for the full text search | mediumtext | YES | | NULL | | | created | | datetime | YES | | NULL | | | restricted | If true, this post is either unlisted or not from a federated network | boolean | NO | | 0 | | diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index cb5ea1c23f..b244621fbe 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -1366,7 +1366,7 @@ return [ "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "Item owner"], "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Person, organisation, news, community, relay"], "media-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Type of media in a bit array (1 = image, 2 = video, 4 = audio"], - "language" => ["type" => "varbinary(128)", "comment" => "Language information about this post"], + "language" => ["type" => "varchar(128)", "comment" => "Language information about this post"], "searchtext" => ["type" => "mediumtext", "comment" => "Simplified text for the full text search"], "created" => ["type" => "datetime", "comment" => ""], "restricted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "If true, this post is either unlisted or not from a federated network"],