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 installandconan searchcommands 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 tablespackages_packagesandpackages_conan_metadata, and perform a query. -
conan uploadWhen the new package or recipe file is uploaded, we need to create a new entry inpackages_conan_metadatatable.
Proposal
- Change the relation between conan packages and conan metadata to
1:N. - Add
package_revision,package_referenceandrecipe_revisioncolumns topackages_conan_metadatatable.
Next steps
Change the conan upload to save the revision information in the packages_conan_metadata table.