summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authorStephanie Daugherty <sdaugherty@gmail.com>2011-08-29 23:29:30 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-08-29 23:29:30 +0200
commit8e5e72fccecb5ad778188d0d3a807cc5c0c0ac7c (patch)
tree0a846f335e338fcb7a38db932e3217095d9f03c9 /Bugzilla/DB
parentdd0e1c27011f13edc0083078ebef7d061822cff7 (diff)
downloadbugzilla-8e5e72fccecb5ad778188d0d3a807cc5c0c0ac7c.tar.gz
bugzilla-8e5e72fccecb5ad778188d0d3a807cc5c0c0ac7c.tar.xz
Bug 637648 - Rename the "tags" table to "tag"
r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Schema.pm6
-rw-r--r--Bugzilla/DB/Sqlite.pm4
2 files changed, 7 insertions, 3 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index fb62965e3..33527c367 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -1000,7 +1000,7 @@ use constant ABSTRACT_SCHEMA => {
],
},
- tags => {
+ tag => {
FIELDS => [
id => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1},
name => {TYPE => 'varchar(64)', NOTNULL => 1},
@@ -1010,7 +1010,7 @@ use constant ABSTRACT_SCHEMA => {
DELETE => 'CASCADE'}},
],
INDEXES => [
- tags_user_id_idx => {FIELDS => [qw(user_id name)], TYPE => 'UNIQUE'},
+ tag_user_id_idx => {FIELDS => [qw(user_id name)], TYPE => 'UNIQUE'},
],
},
@@ -1021,7 +1021,7 @@ use constant ABSTRACT_SCHEMA => {
COLUMN => 'bug_id',
DELETE => 'CASCADE'}},
tag_id => {TYPE => 'INT3', NOTNULL => 1,
- REFERENCES => {TABLE => 'tags',
+ REFERENCES => {TABLE => 'tag',
COLUMN => 'id',
DELETE => 'CASCADE'}},
],
diff --git a/Bugzilla/DB/Sqlite.pm b/Bugzilla/DB/Sqlite.pm
index e40a264f0..fab1e3c87 100644
--- a/Bugzilla/DB/Sqlite.pm
+++ b/Bugzilla/DB/Sqlite.pm
@@ -39,6 +39,10 @@ use constant ISOLATION_LEVEL => undef;
use constant WORD_START => '(?:^|\W)';
use constant WORD_END => '(?:$|\W)';
+# For some reason, dropping the related FKs causes the index to
+# disappear early, which causes all sorts of problems.
+use constant INDEX_DROPS_REQUIRE_FK_DROPS => 0;
+
####################################
# Functions Added To SQLite Itself #
####################################