Skip to content

Commit 3305a28

Browse files
committed
Fix message.edit_date type as timestamp.
1 parent 9ca6158 commit 3305a28

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
55

66
## [Unreleased]
77
### Notes
8-
- [:ledger: View file changes][Unreleased]
8+
- [:ledger: View file changes][Unreleased][:page_with_curl: DB migration script][unreleased-sql-migration]
99
### Added
1010
### Changed
1111
### Deprecated
1212
### Removed
1313
### Fixed
14+
- `message.edit_date` is now of type `timestamp`.
1415
### Security
1516

1617
## [0.71.0] - 2021-03-05
@@ -501,6 +502,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
501502
### Deprecated
502503
- Move `hideKeyboard` to `removeKeyboard`.
503504

505+
[unreleased-sql-migration]: https://github.com/php-telegram-bot/core/tree/master/utils/db-schema-update/0.71.0-unreleased.sql
504506
[0.70.0-sql-migration]: https://github.com/php-telegram-bot/core/tree/master/utils/db-schema-update/0.64.0-0.70.0.sql
505507
[0.70.0-bc-minimum-php-73]: https://github.com/php-telegram-bot/core/wiki/Breaking-backwards-compatibility#minimum-php-73
506508
[0.63.0-sql-migration]: https://github.com/php-telegram-bot/core/tree/master/utils/db-schema-update/0.62.0-0.63.0.sql

structure.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ CREATE TABLE IF NOT EXISTS `message` (
8282
`reply_to_chat` bigint NULL DEFAULT NULL COMMENT 'Unique chat identifier',
8383
`reply_to_message` bigint UNSIGNED DEFAULT NULL COMMENT 'Message that this message is reply to',
8484
`via_bot` bigint NULL DEFAULT NULL COMMENT 'Optional. Bot through which the message was sent',
85-
`edit_date` bigint UNSIGNED DEFAULT NULL COMMENT 'Date the message was last edited in Unix time',
85+
`edit_date` timestamp NULL DEFAULT NULL COMMENT 'Date the message was last edited in Unix time',
8686
`media_group_id` TEXT COMMENT 'The unique identifier of a media message group this message belongs to',
8787
`author_signature` TEXT COMMENT 'Signature of the post author for messages in channels',
8888
`text` TEXT COMMENT 'For text messages, the actual UTF-8 text of the message max message length 4096 char utf8mb4',
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE `message` MODIFY `edit_date` timestamp NULL DEFAULT NULL COMMENT 'Date the message was last edited in Unix time';

0 commit comments

Comments
 (0)