Skip to content

Commit a8f90be

Browse files
authored
Merge pull request #1135 from noplanman/1125-fix_migration_script
Fix migration script for older versions of MySQL.
2 parents edd1ebe + 9d6ddd2 commit a8f90be

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
1111
### Deprecated
1212
### Removed
1313
### Fixed
14+
- Correct SQL migration script for older versions of MySQL.
1415
### Security
1516

1617
## [0.63.1] - 2020-06-24

utils/db-schema-update/0.62.0-0.63.0.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ ALTER TABLE `poll` ADD COLUMN `close_date` timestamp NULL DEFAULT NULL COMMENT '
55

66
ALTER TABLE `poll_answer` DROP PRIMARY KEY, ADD PRIMARY KEY (`poll_id`, `user_id`);
77

8-
ALTER TABLE `message` DROP CONSTRAINT `message_ibfk_6`;
8+
ALTER TABLE `message`
9+
DROP FOREIGN KEY IF EXISTS `message_ibfk_6`,
10+
DROP INDEX IF EXISTS `message_ibfk_6`;
11+
912
ALTER TABLE `message`
1013
ADD COLUMN `via_bot` bigint NULL DEFAULT NULL COMMENT 'Optional. Bot through which the message was sent' AFTER `reply_to_message`,
1114
ADD KEY `via_bot` (`via_bot`),

0 commit comments

Comments
 (0)