summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-08-31 19:00:41 +0200
committerByron Jones <glob@mozilla.com>2015-08-31 19:00:41 +0200
commitfcfcdf2ff049546bc96ff1296e2f5663b96f11fb (patch)
treeba860e6325b90092a5f380c2a11f0dbdbdce30a9 /Bugzilla
parent1bcdb37ba6448dc72452f371327ba5539f6604ed (diff)
downloadbugzilla-fcfcdf2ff049546bc96ff1296e2f5663b96f11fb.tar.gz
bugzilla-fcfcdf2ff049546bc96ff1296e2f5663b96f11fb.tar.xz
Bug 1197073 - add support for 2fa using totp (schema-only)
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/DB/Schema.pm14
-rw-r--r--Bugzilla/Install/DB.pm2
2 files changed, 16 insertions, 0 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index abe52be90..5869339a3 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -952,6 +952,7 @@ use constant ABSTRACT_SCHEMA => {
last_seen_date => {TYPE => 'DATETIME'},
password_change_required => { TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'FALSE' },
password_change_reason => { TYPE => 'varchar(64)' },
+ mfa => {TYPE => 'varchar(8)', DEFAULT => "''" },
],
INDEXES => [
profiles_login_name_idx => {FIELDS => ['login_name'],
@@ -1001,6 +1002,19 @@ use constant ABSTRACT_SCHEMA => {
],
},
+ profile_mfa => {
+ FIELDS => [
+ id => { TYPE => 'INTSERIAL', NOTNULL => 1, PRIMARYKEY => 1 },
+ user_id => { TYPE => 'INT3', NOTNULL => 1,
+ REFERENCES => { TABLE => 'profiles', COLUMN => 'userid', DELETE => 'CASCADE' } },
+ name => { TYPE => 'varchar(16)', NOTNULL => 1 },
+ value => { TYPE => 'varchar(255)' },
+ ],
+ INDEXES => [
+ profile_mfa_userid_name_idx => { FIELDS => [ 'user_id', 'name' ], TYPE => 'UNIQUE' },
+ ],
+ },
+
email_setting => {
FIELDS => [
user_id => {TYPE => 'INT3', NOTNULL => 1,
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 9a329d355..867aefe19 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -752,6 +752,8 @@ sub update_table_definitions {
$dbh->bz_add_column('profiles', 'password_change_reason',
{ TYPE => 'varchar(64)' });
+ $dbh->bz_add_column('profiles', 'mfa', { TYPE => 'varchar(8)', , DEFAULT => "''" });
+
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################