Composer packages: delegate composer_json to metadatum

Context

The recently added packages_composer_packages table Add packages_composer_packages database table (!186126 - merged) that will be used for the composer packages in the future, has its own composer_json column. In order to make the transition to the new table smoother, this MR adds the delegator for composer_json attribute.

What does this MR do and why?

Composer packages: delegate composer_json to metadatum.

References

Foundation: Prepare application code to read fr... (#548761 - closed)

Screenshots or screen recordings

No.

How to set up and validate locally

Verify the changes in the rails console:

# stub file upload
def fixture_file_upload(*args, **kwargs)
  Rack::Test::UploadedFile.new(*args, **kwargs)
end

p = FactoryBot.create(:composer_package, :with_metadatum)
p.composer_json # check the value
p.composer_json == p.composer_metadatum.composer_json

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #548761 (closed)

Edited by Dzmitry (Dima) Meshcharakou

Merge request reports

Loading