From 859506fce6bf380f272c95e0339cea938422544e Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Tue, 27 Aug 2024 16:15:07 -0400 Subject: [PATCH] Bug 1421401 - Implement emoji comment reactions (schema only) --- Bugzilla/DB/Schema.pm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 1ee46f2d25..31715f07df 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -418,6 +418,32 @@ use constant ABSTRACT_SCHEMA => { ], }, + longdescs_reactions => { + FIELDS => [ + id => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1}, + comment_id => { + TYPE => 'INT4', + REFERENCES => + {TABLE => 'longdescs', COLUMN => 'comment_id', DELETE => 'CASCADE'} + }, + user_id => { + TYPE => 'INT3', + NOTNULL => 1, + REFERENCES => {TABLE => 'profiles', COLUMN => 'userid'} + }, + reaction => {TYPE => 'varchar(24)', NOTNULL => 1}, + ], + INDEXES => [ + longdescs_reactions_reaction_idx => { + FIELDS => ['comment_id', 'reaction'], + }, + longdescs_reactions_user_idx => { + FIELDS => ['comment_id', 'user_id', 'reaction'], + TYPE => 'UNIQUE', + }, + ], + }, + longdescs_tags => { FIELDS => [ id => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1},