diff options
author | mkanat%bugzilla.org <> | 2006-08-04 13:04:25 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-08-04 13:04:25 +0200 |
commit | d4def1e24aa0e9329df1e39de161830b4884e565 (patch) | |
tree | 2696340a0a1de6104a8b9c463c772ad2d520e7a0 /Bugzilla/Install | |
parent | 7c9ed2d47efc8f5747a61f8e59ce0cb2e83d797b (diff) | |
download | bugzilla-d4def1e24aa0e9329df1e39de161830b4884e565.tar.gz bugzilla-d4def1e24aa0e9329df1e39de161830b4884e565.tar.xz |
Bug 347290: Move default product and classification creation into Bugzilla::Install
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=justdave
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r-- | Bugzilla/Install/DB.pm | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index 46e9b5c5a..9b29bbc76 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -449,6 +449,16 @@ sub update_table_definitions { _add_classifications_sortkey(); _move_data_nomail_into_db(); + + # The products table lacked sensible defaults. + $dbh->bz_alter_column('products', 'milestoneurl', + {TYPE => 'TINYTEXT', NOTNULL => 1, DEFAULT => "''"}); + $dbh->bz_alter_column('products', 'disallownew', + {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 0}); + $dbh->bz_alter_column('products', 'votesperuser', + {TYPE => 'INT2', NOTNULL => 1, DEFAULT => 0}); + $dbh->bz_alter_column('products', 'votestoconfirm', + {TYPE => 'INT2', NOTNULL => 1, DEFAULT => 0}); ################################################################ # New --TABLE-- changes should go *** A B O V E *** this point # @@ -1194,9 +1204,10 @@ sub _use_ids_for_products_and_components { $dbh->do("UPDATE attachstatusdefs SET product_id = $product_id " . "WHERE product = " . $dbh->quote($product)) if $dbh->bz_table_info("attachstatusdefs"); - } + } + + print "Updating the database to use component IDs.\n"; - print "Updating the database to use component IDs.\n"; $dbh->bz_add_column("components", "id", {TYPE => 'SMALLSERIAL', NOTNULL => 1, PRIMARYKEY => 1}); $dbh->bz_add_column("bugs", "component_id", |