diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-01-30 13:26:09 +0300 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-02-01 11:38:03 +0200 |
commit | f5bda2db551e38d62a49fa8c579e750060b60d59 (patch) | |
tree | 599998f5a383b697cd6313f3365e1e3bd15b31e1 | |
parent | 65b57d04735886fbd8b202c32ffc592ac44db2c2 (diff) |
Add upstream_version and project members to available_package type
-rw-r--r-- | bpkg/package.hxx | 10 | ||||
-rw-r--r-- | bpkg/package.xml | 7 |
2 files changed, 15 insertions, 2 deletions
diff --git a/bpkg/package.hxx b/bpkg/package.hxx index 14cd296..8796036 100644 --- a/bpkg/package.hxx +++ b/bpkg/package.hxx @@ -27,7 +27,7 @@ // #define DB_SCHEMA_VERSION_BASE 12 -#pragma db model version(DB_SCHEMA_VERSION_BASE, 21, closed) +#pragma db model version(DB_SCHEMA_VERSION_BASE, 22, closed) namespace bpkg { @@ -679,9 +679,13 @@ namespace bpkg { public: using version_type = bpkg::version; + using upstream_version_type = bpkg::upstream_version; available_package_id id; - upstream_version version; + upstream_version_type version; + + optional<string> upstream_version; + optional<package_name> project; // List of repository fragments to which this package version belongs // (yes, in our world, it can be in multiple, unrelated repositories) @@ -738,6 +742,8 @@ namespace bpkg available_package (package_manifest&& m) : id (move (m.name), m.version), version (move (m.version)), + upstream_version (move (m.upstream_version)), + project (move (m.project)), dependencies (convert (move (m.dependencies))), tests (move (m.tests)), distribution_values (move (m.distribution_values)), diff --git a/bpkg/package.xml b/bpkg/package.xml index baa8dfb..a8558fd 100644 --- a/bpkg/package.xml +++ b/bpkg/package.xml @@ -1,4 +1,11 @@ <changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="sqlite" version="1"> + <changeset version="22"> + <alter-table name="main.available_package"> + <add-column name="upstream_version" type="TEXT" null="true"/> + <add-column name="project" type="TEXT" null="true" options="COLLATE NOCASE"/> + </alter-table> + </changeset> + <changeset version="21"> <add-table name="main.available_package_distribution_values" kind="container"> <column name="name" type="TEXT" null="true" options="COLLATE NOCASE"/> |