Add patch_id_sha column to approvals
Add `patch_id_sha` column to eventually record the `patch_id` of the most-current `merge_request_diff` when the approval is created. We associate to `patch_id` rather than setting up an ActiveRecord association to a `MergeRequestDiff` since the approval is given against a _diff_, and the same diff (from a functional perspective) can be included in multiple `MergeRequestDiff` records (for instance, when an MR is rebased, the diff itself doesn't functionally change, but a new `MergeRequestDiff` record is created.) Adding this data to `approvals` records will help us detect when an approval is still valid, even if new `MergeRequestDiffs` are created. Related to https://gitlab.com/gitlab-org/gitlab/-/issues/422818 Prior related work: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/126920 Changelog: added
显示
- app/models/approval.rb 3 个添加, 0 个删除app/models/approval.rb
- db/migrate/20230823174108_add_patch_id_sha_on_approvals.rb 13 个添加, 0 个删除db/migrate/20230823174108_add_patch_id_sha_on_approvals.rb
- db/schema_migrations/20230823174108 1 个添加, 0 个删除db/schema_migrations/20230823174108
- db/structure.sql 2 个添加, 1 个删除db/structure.sql
db/schema_migrations/20230823174108
0 → 100644
想要评论请 注册 或 登录