Skip to content

Commit

Permalink
Added missing chat_boost_updated and chat_boost_removed references to…
Browse files Browse the repository at this point in the history
… structure.sql
  • Loading branch information
TiiFuchs committed May 30, 2024
1 parent 8f9cd11 commit a612226
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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`),
Expand Down Expand Up @@ -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` (
Expand Down
4 changes: 2 additions & 2 deletions utils/db-schema-update/0.82.0-0.83.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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`);

0 comments on commit a612226

Please sign in to comment.