Commit Graph

2 Commits

Author SHA1 Message Date
Simon Williams 6e877868be support both old and new postgres versions for new submission column
this migration was originally written with a backfill, but the
submissions table was large enough that the backfill was very slow. so
we changed to create the column with a default, taking advantage of
PG11+ ability to do this quickly rather than lock the table. But some
operators have not upgraded postgres versions yet, so let's support both
methods for now, while we work out a clear upgrade timeline.

Change-Id: I7e745c16ba162ab2740e9387e3138a7fca74df8c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261779
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-04-06 14:23:44 +00:00
Cody Cutrer 7574f599bb change backfill migration to just drop/add the column with default instead
it's much faster with postgres >= 11

Change-Id: Iba90373eaf6622c7b0e048bf898a9eea0fa15ac6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260034
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-03-05 16:24:21 +00:00