Skip to content

Commit

Permalink
Add yank message migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 committed Aug 17, 2024
1 parent d036f89 commit c9d832b
Show file tree
Hide file tree
Showing 4 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 VARCHAR(255);

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
3 changes: 3 additions & 0 deletions src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,9 @@ 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
#[max_length = 255]
yank_message -> Nullable<Varchar>,
}
}

Expand Down

0 comments on commit c9d832b

Please sign in to comment.