Description of problem: When running checksetup.pl on a 3.2 database to convert to 3.4 with live data the following error is generated: Adding new column 'password_last_changed' to the 'profiles' table... DBD::mysql::db do failed: Duplicate column name 'password_last_changed' [for Statement "ALTER TABLE profiles ADD COLUMN password_last_changed datetime"] at Bugzilla/DB.pm line 498 Bugzilla::DB::bz_add_column('Bugzilla::DB::Mysql=HASH(0x1cbd0000)', 'profiles', 'password_last_changed', 'HASH(0x1fe11c90)') called at Bugzilla/Install/DB.pm line 564 Bugzilla::Install::DB::update_table_definitions('HASH(0x19996170)') called at ./checksetup.pl line 192 This comes from the fact that the column was not added properly using Bugzilla->dbh->bz_add_column() instead was added via direct CREATE TABLE SQL. Need to figure out how to make add this column to the bz schema table without dropping and readding, which will loose the current data for that column. Dave
I think I found a workaround for this. We just need to fool checksetup.pl to think that the column is in the schema stored in the bugzilla schema table. So we can call the internal Bugzilla::DB::Schema and Bugzilla::DB functions. Bugzilla->dbh->_bz_real_schema->set_column('profiles', 'password_last_changed', { TYPE => 'DATETIME' }); Bugzilla->dbh->_bz_store_real_schema; Then when checksetup runs it will see that the column is already there and will not generate the SQL error. Maybe...will test
Have run a script to update bz_schema on production bugzilla db. This bug should have been fixed.