Rename ci_runners.maintainer_note -> ci_runners.maintenance_note
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Based on the discussion in gitlab-runner!3268 (comment 815663628) it emerged that the new maintainer_note field name (also released in a REST API in %14.7 through !77779 (merged)) was not a good name for several reasons, namely because 'maintainer' is the name of a role, which does not necessarily need to match the role in which this field is used, and there is already an instance of a maintainer_note in our code which is related to the Note model.
#350730 (closed) already renamed every usage of maintainer_note except for the table column, so this MR deals with that remaining task.
Implementation
TODO
Additional notes
The following discussion from !78677 (merged) should be addressed:
-
@pbair started a discussion: (+6 comments) I don't think we can use the
rename_column_concurrentlyhelper to do this, since it's only intended to be used for smaller tables. This table isn't very large, but large enough to update inline in a migration.We'd have to use a background migration to copy the data, which would be somewhat more complicated as we don't have a helper for this. I think roughly:
- Update the app to handle/ignore the new column, and a migration which adds the column and trigger to copy values
- Add a post-deploy migration which kicks off a background migration to copy the data for existing rows
- In the N+1 release, add a post-deploy migration which cleans up the background migration (data is now fully synced)
- In the N+2 release, update the app to work with the new column, drop the trigger and old column