summaryrefslogtreecommitdiffstats
path: root/extensions/ComponentWatching
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-06-09 16:26:00 +0200
committerByron Jones <glob@mozilla.com>2014-06-09 16:26:00 +0200
commitf0cab2479e25ab0ed36a8bf256406d80b21ddb19 (patch)
tree11a26f7d8cc40e9940f8ecc8e18e8561c222266a /extensions/ComponentWatching
parente33a04dd4ef4399d00c32a0059aed2e210b3f1a6 (diff)
downloadbugzilla-f0cab2479e25ab0ed36a8bf256406d80b21ddb19.tar.gz
bugzilla-f0cab2479e25ab0ed36a8bf256406d80b21ddb19.tar.xz
Bug 720832: Add the ability to watch component starting with a string
(schema only)
Diffstat (limited to 'extensions/ComponentWatching')
-rw-r--r--extensions/ComponentWatching/Extension.pm32
1 files changed, 29 insertions, 3 deletions
diff --git a/extensions/ComponentWatching/Extension.pm b/extensions/ComponentWatching/Extension.pm
index c4951d877..addbaba70 100644
--- a/extensions/ComponentWatching/Extension.pm
+++ b/extensions/ComponentWatching/Extension.pm
@@ -28,8 +28,13 @@ sub db_schema_abstract_schema {
my ($self, $args) = @_;
$args->{'schema'}->{'component_watch'} = {
FIELDS => [
+ id => {
+ TYPE => 'MEDIUMSERIAL',
+ NOTNULL => 1,
+ PRIMARYKEY => 1,
+ },
user_id => {
- TYPE => 'INT3',
+ TYPE => 'INT3',
NOTNULL => 1,
REFERENCES => {
TABLE => 'profiles',
@@ -38,7 +43,7 @@ sub db_schema_abstract_schema {
}
},
component_id => {
- TYPE => 'INT2',
+ TYPE => 'INT2',
NOTNULL => 0,
REFERENCES => {
TABLE => 'components',
@@ -47,7 +52,7 @@ sub db_schema_abstract_schema {
}
},
product_id => {
- TYPE => 'INT2',
+ TYPE => 'INT2',
NOTNULL => 0,
REFERENCES => {
TABLE => 'products',
@@ -55,6 +60,10 @@ sub db_schema_abstract_schema {
DELETE => 'CASCADE',
}
},
+ component_prefix => {
+ TYPE => 'VARCHAR(64)',
+ NOTNULL => 0,
+ },
],
};
}
@@ -73,6 +82,23 @@ sub install_update_db {
}
}
);
+ $dbh->bz_add_column(
+ 'component_watch',
+ 'id',
+ {
+ TYPE => 'MEDIUMSERIAL',
+ NOTNULL => 1,
+ PRIMARYKEY => 1,
+ },
+ );
+ $dbh->bz_add_column(
+ 'component_watch',
+ 'component_prefix',
+ {
+ TYPE => 'VARCHAR(64)',
+ NOTNULL => 0,
+ }
+ );
}
#