Skip to content

Commit 666dfcc

Browse files
authored
database: Add versions.yank_message column (#9274)
Signed-off-by: hi-rustin <[email protected]> Co-authored-by: hi-rustin <[email protected]>
1 parent 11ccce0 commit 666dfcc

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE versions DROP yank_message;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTER TABLE versions ADD COLUMN yank_message TEXT;
2+
3+
COMMENT ON COLUMN versions.yank_message IS 'message associated with a yanked version';

src/models/version.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub struct Version {
3131
pub rust_version: Option<String>,
3232
pub has_lib: Option<bool>,
3333
pub bin_names: Option<Vec<Option<String>>>,
34+
pub yank_message: Option<String>,
3435
}
3536

3637
impl Version {

src/schema.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,8 @@ diesel::table! {
985985
has_lib -> Nullable<Bool>,
986986
/// list of the names of all detected binaries in the version. the list may be empty which indicates that no binaries were detected in the version. the column may be NULL is the version has not been analyzed yet.
987987
bin_names -> Nullable<Array<Nullable<Text>>>,
988+
/// message associated with a yanked version
989+
yank_message -> Nullable<Text>,
988990
}
989991
}
990992

src/worker/jobs/dump_db/dump-db.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ links = "public"
233233
rust_version = "public"
234234
has_lib = "public"
235235
bin_names = "public"
236+
yank_message = "private"
236237

237238
[versions_published_by.columns]
238239
version_id = "private"

0 commit comments

Comments
 (0)