From: Israel Madueme Date: Fri, 10 May 2019 03:20:35 +0000 (-0400) Subject: Bug 1550145 - Add 'forget_after_date' field to profiles table X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=564abfe11d63bf099c6341506b23911377c4a04f;p=thirdparty%2Fbugzilla.git Bug 1550145 - Add 'forget_after_date' field to profiles table Adds a datetime `forget_after_date` field to the profiles table. This field will be used when determining which unresponsive inactive users to remove periodically. This field will be normally set to 30 days after BMO notifies that a user has been "inactive" for a very long time, thus, giving the user 30 days to respond to prevent being forgotten. Another benefit of this datetime field is that we can choose to send reminder emails as their forget-date approaches (we may choose not to do this for other reasons). `forget_after_date`: - If null, the user should not be forgotten. - If set, the user can & should be forgotten at anytime after the set date. - This field should be unset anytime the user logs in or specifically requests to not be forgotten. --- diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 9eb386047..2e8cb3640 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -946,6 +946,7 @@ use constant ABSTRACT_SCHEMA => { password_change_reason => {TYPE => 'varchar(64)'}, mfa => {TYPE => 'varchar(8)', DEFAULT => "''"}, mfa_required_date => {TYPE => 'DATETIME'}, + forget_after_date => {TYPE => 'DATETIME'}, ], INDEXES => [ profiles_login_name_idx => {FIELDS => ['login_name'], TYPE => 'UNIQUE'}, diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index e5a5e182a..49e37436f 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -758,6 +758,10 @@ sub update_table_definitions { {TYPE => 'varchar(8)',, DEFAULT => "''"}); $dbh->bz_add_column('profiles', 'mfa_required_date', {TYPE => 'DATETIME'}); + + # 2019-05-08 imadueme@mozilla.com - Bug 1550145 + $dbh->bz_add_column('profiles', 'forget_after_date', {TYPE => 'DATETIME'}); + _migrate_group_owners(); $dbh->bz_add_column('groups', 'idle_member_removal',