Add published_by to CI Catalog Resource Version
What does this MR do and why?
This MR adds published_by to CI Catalog Resource Version because
publishing will be a separate endpoint and we want to validate / store
the publisher.
published_by is the user who publishes the CI Catalog Resource Version.
It must be equal to the release author because creating a release
and publishing a version must be done in a single session
via release-cli.
A user can be deleted but it does not mean that we should delete
versions. So, our foreign key strategy here is "nullify".
This is also one of the reasons why we require this validation only
on: :create.
For old data, we'll implement a background migration to copy
release.author to version.published_by.
Related to #442783 (closed)
Implementation table
| Step | Status |
|---|---|
| Extract CI catalog component builder into a ser... (!159703 - merged) | |
| Add published_by to CI Catalog Resource Version (!162843 - merged) | |
Migration from release.author to version.published_by
|
TODO |
| API Endpoint for CI Catalog Publish | TODO |
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.