From ca9eeb1c9e51c39a33070efeba01aac105ed9aa7 Mon Sep 17 00:00:00 2001 From: Tii Date: Thu, 30 May 2024 23:01:31 +0200 Subject: [PATCH] Added missing chat_boost_updated and chat_boost_removed references to structure.sql --- structure.sql | 6 +++++- utils/db-schema-update/0.82.0-0.83.0.sql | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/structure.sql b/structure.sql index 357501ec..d36af44f 100644 --- a/structure.sql +++ b/structure.sql @@ -378,6 +378,8 @@ CREATE TABLE IF NOT EXISTS `telegram_update` ( `my_chat_member_updated_id` BIGINT UNSIGNED NULL COMMENT 'The bot''s chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.', `chat_member_updated_id` BIGINT UNSIGNED NULL COMMENT 'A chat member''s status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates.', `chat_join_request_id` BIGINT UNSIGNED NULL COMMENT 'A request to join the chat has been sent', + `chat_boost_updated_id` BIGINT UNSIGNED NULL COMMENT 'A chat boost was added or changed.', + `chat_boost_removed_id` BIGINT UNSIGNED NULL COMMENT 'A boost was removed from a chat.', PRIMARY KEY (`id`), KEY `message_id` (`message_id`), @@ -409,7 +411,9 @@ CREATE TABLE IF NOT EXISTS `telegram_update` ( FOREIGN KEY (`poll_answer_poll_id`) REFERENCES `poll_answer` (`poll_id`), FOREIGN KEY (`my_chat_member_updated_id`) REFERENCES `chat_member_updated` (`id`), FOREIGN KEY (`chat_member_updated_id`) REFERENCES `chat_member_updated` (`id`), - FOREIGN KEY (`chat_join_request_id`) REFERENCES `chat_join_request` (`id`) + FOREIGN KEY (`chat_join_request_id`) REFERENCES `chat_join_request` (`id`), + FOREIGN KEY (`chat_boost_updated_id`) REFERENCES `chat_boost_updated` (`id`), + FOREIGN KEY (`chat_boost_removed_id`) REFERENCES `chat_boost_removed` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; CREATE TABLE IF NOT EXISTS `conversation` ( diff --git a/utils/db-schema-update/0.82.0-0.83.0.sql b/utils/db-schema-update/0.82.0-0.83.0.sql index 6b9a7eac..72f35053 100644 --- a/utils/db-schema-update/0.82.0-0.83.0.sql +++ b/utils/db-schema-update/0.82.0-0.83.0.sql @@ -70,8 +70,8 @@ ALTER TABLE `telegram_update` ADD COLUMN `message_reaction_id` bigint UNSIGNED DEFAULT NULL COMMENT 'A reaction to a message was changed by a user' AFTER `edited_channel_post_id`, ADD COLUMN `message_reaction_count_id` bigint UNSIGNED DEFAULT NULL COMMENT 'Reactions to a message with anonymous reactions were changed' AFTER `message_reaction_id`; -ALTER TABLE `telegram_update` ADD COLUMN `chat_boost_updated_id` BIGINT UNSIGNED NULL COMMENT 'A boost update the chat has been sent'; +ALTER TABLE `telegram_update` ADD COLUMN `chat_boost_updated_id` BIGINT UNSIGNED NULL COMMENT 'A chat boost was added or changed.'; ALTER TABLE `telegram_update` ADD FOREIGN KEY (`chat_boost_updated_id`) REFERENCES `chat_boost_updated` (`id`); -ALTER TABLE `telegram_update` ADD COLUMN `chat_boost_removed_id` BIGINT UNSIGNED NULL COMMENT 'A boost remove from the chat has been sent'; +ALTER TABLE `telegram_update` ADD COLUMN `chat_boost_removed_id` BIGINT UNSIGNED NULL COMMENT 'A boost was removed from a chat.'; ALTER TABLE `telegram_update` ADD FOREIGN KEY (`chat_boost_removed_id`) REFERENCES `chat_boost_removed` (`id`);