issues.closed_at set as datetime instead of datetime_with_timezone since GitLab v10.3.0

In gitlab-qa#176 (closed), we saw the migration assumed closed_at was datetime_with_timezone, otherwise it presumed the migration was still in progress (i.e. closed_at_for_type_change still existed as a temporary column).

It looks like EE users have had this set incorrectly since v10.3.0 via gitlab-org/gitlab-ee@01b0617cb47. I think it's possible for EE users to:

  1. Install 10.4.0 EE (since 78d22fb2 shipped then)
  2. Upgrade to 10.5.0 and hit a missing closed_at_for_type_change error in the migration

I think we should reschedule the migration if:

  1. The closed_at column is not datetime
  2. The closed_at_for_type_change column does not exist

/cc: @yorickpeterse

Assignee Loading
Time tracking Loading