diff options
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/ComponentWatching/Extension.pm | 32 |
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, + } + ); } # |