Skip to content

Commit

Permalink
Add yank message migration
Browse files Browse the repository at this point in the history
Signed-off-by: hi-rustin <[email protected]>
  • Loading branch information
Rustin170506 committed Aug 20, 2024
1 parent d036f89 commit 7083232
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions migrations/2024-08-17-152408_add-yank-message/down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE versions DROP yank_message;
3 changes: 3 additions & 0 deletions migrations/2024-08-17-152408_add-yank-message/up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ALTER TABLE versions ADD COLUMN yank_message TEXT;

COMMENT ON COLUMN versions.yank_message IS 'message associated with a yanked version';
1 change: 1 addition & 0 deletions src/models/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub struct Version {
pub rust_version: Option<String>,
pub has_lib: Option<bool>,
pub bin_names: Option<Vec<Option<String>>>,
pub yank_message: Option<String>,
}

impl Version {
Expand Down
2 changes: 2 additions & 0 deletions src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,8 @@ diesel::table! {
has_lib -> Nullable<Bool>,
/// 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.
bin_names -> Nullable<Array<Nullable<Text>>>,
/// message associated with a yanked version
yank_message -> Nullable<Text>,
}
}

Expand Down
1 change: 1 addition & 0 deletions src/worker/jobs/dump_db/dump-db.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ links = "public"
rust_version = "public"
has_lib = "public"
bin_names = "public"
yank_message = "private"

[versions_published_by.columns]
version_id = "private"
Expand Down

0 comments on commit 7083232

Please sign in to comment.