diff --git a/migrations/2024-08-17-152408_add-yank-message/down.sql b/migrations/2024-08-17-152408_add-yank-message/down.sql new file mode 100644 index 00000000000..3240cac6b83 --- /dev/null +++ b/migrations/2024-08-17-152408_add-yank-message/down.sql @@ -0,0 +1 @@ +ALTER TABLE versions DROP yank_message; diff --git a/migrations/2024-08-17-152408_add-yank-message/up.sql b/migrations/2024-08-17-152408_add-yank-message/up.sql new file mode 100644 index 00000000000..b6f28f492a4 --- /dev/null +++ b/migrations/2024-08-17-152408_add-yank-message/up.sql @@ -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'; diff --git a/src/models/version.rs b/src/models/version.rs index 4966ad724ec..3761e701316 100644 --- a/src/models/version.rs +++ b/src/models/version.rs @@ -31,6 +31,7 @@ pub struct Version { pub rust_version: Option, pub has_lib: Option, pub bin_names: Option>>, + pub yank_message: Option, } impl Version { diff --git a/src/schema.rs b/src/schema.rs index 8ef596e23b5..2078c84dcd3 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -985,6 +985,9 @@ diesel::table! { has_lib -> Nullable, /// 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>>, + /// message associated with a yanked version + #[max_length = 255] + yank_message -> Nullable, } }