Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database: Add versions.yank_message column #9274

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Turbo87 marked this conversation as resolved.
Show resolved Hide resolved

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