Skip to content

Support conan revisions metadata in database

Description

Currently conan packages have 1:1 relation with conan metadata. This has the limitations when a package has multiple package revisions, since we can save the package settings only from one revision.

Use cases

  • conan install and conan search commands support revisions docs. The package might be requested using package's name, version, username and channel. Additionally users can specify:

      - `recipe_revision`
      - `recipe_revision` and `package_reference`
      - `recipe_revision`, `package_reference` and `package_revision`

    We need to keep in mind those search patterns when designing database tables.
    When doing a search for a package we could join two tables packages_packages and packages_conan_metadata, and perform a query.

  • conan upload When the new package or recipe file is uploaded, we need to create a new entry in packages_conan_metadata table.

Proposal

  • Change the relation between conan packages and conan metadata to 1:N.
  • Add package_revision, package_reference and recipe_revision columns to packages_conan_metadata table.

Next steps

Change the conan upload to save the revision information in the packages_conan_metadata table.

Edited by Dzmitry (Dima) Meshcharakou