From 1dd5c45fed34b7ad9d245bf43b699fd3c61e3848 Mon Sep 17 00:00:00 2001 From: hi-rustin <29879298+hi-rustin@users.noreply.github.com> Date: Sat, 17 Aug 2024 23:36:02 +0800 Subject: [PATCH] Add yank message migration --- migrations/2024-08-17-152408_add-yank-message/down.sql | 1 + migrations/2024-08-17-152408_add-yank-message/up.sql | 3 +++ src/schema.rs | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 migrations/2024-08-17-152408_add-yank-message/down.sql create mode 100644 migrations/2024-08-17-152408_add-yank-message/up.sql 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/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, } }