We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ec24eb commit 9e9df02Copy full SHA for 9e9df02
src/metadata.sql
@@ -58,6 +58,7 @@ CREATE TABLE packages (
58
provides JSONB,
59
snapshots JSONB,
60
repology JSONB,
61
+ replaces JSONB,
62
download_count INTEGER,
63
download_count_week INTEGER,
64
download_count_month INTEGER,
src/models.rs
@@ -199,4 +199,5 @@ pub struct RemotePackage {
199
200
pub repology: Option<Vec<String>>,
201
pub snapshots: Option<Vec<String>>,
202
+ pub replaces: Option<Vec<String>>,
203
}
src/repository.rs
@@ -75,6 +75,7 @@ impl<'a> PackageRepository<'a> {
75
let categories = serde_json::to_string(&package.categories).unwrap();
76
let snapshots = serde_json::to_string(&package.snapshots).unwrap();
77
let repology = serde_json::to_string(&package.repology).unwrap();
78
+ let replaces = serde_json::to_string(&package.replaces).unwrap();
79
80
let provides = package.provides.clone().map(|vec| {
81
vec.iter()
@@ -132,6 +133,7 @@ impl<'a> PackageRepository<'a> {
132
133
provides,
134
snapshots,
135
repology,
136
+ replaces,
137
package.download_count,
138
package.download_count_week,
139
package.download_count_month
src/statements.rs
@@ -32,15 +32,15 @@ impl<'a> Statements<'a> {
32
bsum, shasum, icon, desktop, appstream, homepages, notes,
33
source_urls, tags, categories, build_id, build_date,
34
build_action, build_script, build_log, provides, snapshots,
35
- repology, download_count, download_count_week,
+ repology, replaces, download_count, download_count_week,
36
download_count_month
37
)
38
VALUES
39
(
40
?1, jsonb(?2), ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13,
41
jsonb(?14), ?15, ?16, ?17, ?18, jsonb(?19), ?20, ?21, ?22, ?23, ?24, ?25,
42
?26, jsonb(?27), jsonb(?28), jsonb(?29), jsonb(?30), jsonb(?31), ?32, ?33, ?34, ?35, ?36,
43
- jsonb(?37), jsonb(?38), jsonb(?39), ?40, ?41, ?42
+ jsonb(?37), jsonb(?38), jsonb(?39), jsonb(?40), ?41, ?42, ?43
44
45
ON CONFLICT (pkg_id, pkg_name, version) DO NOTHING",
46
)?,
0 commit comments