Fix canonical vs. migration mismatches

Description

The `test-db-migration` target is currently failing with:
```
Generating diff
47a48
> `SchemeGuest` tinyint(4) DEFAULT NULL,
50d50
< `SchemeGuest` tinyint(1) DEFAULT NULL,
74c74
< `GroupConstrained` tinyint(4) DEFAULT NULL,

> `GroupConstrained` tinyint(1) DEFAULT NULL,
210,211c210
< PRIMARY KEY (`GroupId`,`ChannelId`),
< KEY `idx_groupchannels_channelid` (`ChannelId`)

> PRIMARY KEY (`GroupId`,`ChannelId`)
234,235c233
< PRIMARY KEY (`GroupId`,`TeamId`),
< KEY `idx_groupteams_teamid` (`TeamId`)

> PRIMARY KEY (`GroupId`,`TeamId`)
489a488
> `DefaultTeamGuestRole` varchar(64) DEFAULT NULL,
492,493c491
< `DefaultTeamGuestRole` text,
< `DefaultChannelGuestRole` text,

> `DefaultChannelGuestRole` varchar(64) DEFAULT NULL,
545a544
> `SchemeGuest` tinyint(4) DEFAULT NULL,
548d546
< `SchemeGuest` tinyint(1) DEFAULT NULL,
573c571
< `GroupConstrained` tinyint(4) DEFAULT NULL,

> `GroupConstrained` tinyint(1) DEFAULT NULL,
make: *** [test-db-migration] Error 1
```

This is at least in part due to https://github.com/mattermost/mattermost-server/issues/10328. Let's fix this, but also add `test-db-migration` to the CI server to catch this organically before a merge.

QA Test Steps

Test by upgrading from various versions through to v5.16 and confirming the database schema.

Activity

Show:
Lindy Isherwood
October 16, 2019, 12:13 PM

Thanks JH, Saturn tested this. Closing.

Eli Yukelzon
October 13, 2019, 8:17 AM

Jesse Hallam
October 11, 2019, 2:41 PM

Re-opening, since we never cherry-picked this to v5.14, but the migration fixed was applied to the v5.14 upgrade code.

Lindy Isherwood
August 30, 2019, 9:39 AM

Thanks EY, closing. Noted no testing required.

Eli Yukelzon
August 7, 2019, 9:32 AM

Done
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Jesse Hallam

QA Assignee

Lindy Isherwood

Reporter

Jesse Hallam

Fix versions

Mattermost Team

Sustained Engineering

Sprint

None

QA Testing Areas

Other (write in QA test steps)