summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-06-20 22:42:07 +0200
committerdklawren <dklawren@users.noreply.github.com>2018-06-20 22:42:07 +0200
commitfca89e2f4c4a0660d0ce8947f2de375ec20f124b (patch)
tree92da925de3200e5de6f68ca71137a11f389e0733
parent0bb8ea6781ed6262e1a254755d697ab80428754e (diff)
downloadbugzilla-fca89e2f4c4a0660d0ce8947f2de375ec20f124b.tar.gz
bugzilla-fca89e2f4c4a0660d0ce8947f2de375ec20f124b.tar.xz
Bug 1469920 - Update schema: add fulltext index to profiles.realname
-rw-r--r--Bugzilla/DB/Schema.pm7
-rw-r--r--Bugzilla/Install/DB.pm7
2 files changed, 13 insertions, 1 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index 19275206d..67ee9071c 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -924,6 +924,8 @@ use constant ABSTRACT_SCHEMA => {
cryptpassword => {TYPE => 'varchar(128)'},
realname => {TYPE => 'varchar(255)', NOTNULL => 1,
DEFAULT => "''"},
+ nickname => {TYPE => 'varchar(255)', NOTNULL => 1,
+ DEFAULT => "''"},
disabledtext => {TYPE => 'MEDIUMTEXT', NOTNULL => 1,
DEFAULT => "''"},
disable_mail => {TYPE => 'BOOLEAN', NOTNULL => 1,
@@ -943,7 +945,10 @@ use constant ABSTRACT_SCHEMA => {
profiles_login_name_idx => {FIELDS => ['login_name'],
TYPE => 'UNIQUE'},
profiles_extern_id_idx => {FIELDS => ['extern_id'],
- TYPE => 'UNIQUE'}
+ TYPE => 'UNIQUE'},
+ profiles_nickname_idx => ['nickname'],
+ profiles_realname_ft_idx => {FIELDS => ['realname'],
+ TYPE => 'FULLTEXT'},
],
},
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 1729a134b..d81bcfbdc 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -767,6 +767,13 @@ sub update_table_definitions {
$dbh->bz_add_column('components', 'triage_owner_id',
{TYPE => 'INT3'});
+ $dbh->bz_add_column('profiles', 'nickname',
+ {TYPE => 'varchar(255)', NOTNULL => 1, DEFAULT => "''"});
+ $dbh->bz_add_index('profiles', 'profiles_nickname_idx', [qw(nickname)]);
+
+ $dbh->bz_add_index('profiles', 'profiles_realname_ft_idx',
+ {TYPE => 'FULLTEXT', FIELDS => ['realname']});
+
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################