Open Bug 1428674 Opened 8 years ago Updated 8 years ago

When upgrading from an old database, extensions which add columns to the profiles (Bugzilla::User) table cause errors

Categories

(Bugzilla :: Installation & Upgrading, enhancement, P3)

Harmony
enhancement

Tracking

()

Bugzilla 6.0

People

(Reporter: dylan, Unassigned, Mentored)

Details

Attachments

(1 file)

42 bytes, text/x-github-pull-request
Details | Review
e.g. From ContributorEngagement: DBD::mysql::db selectrow_hashref failed: Unknown column 'first_patch_reviewed_id' in 'field list' [for Statement "SELECT profiles.userid,profiles.login_name,profiles.realname,profiles.mybugslink AS showmybugslink,profiles.disabledtext,profiles.disable_mail,profiles.extern_id,profiles.is_enabled,DATE_FORMAT(last_seen_date, '%Y-%m-%d') AS last_seen_date,profiles.password_change_required,profiles.password_change_reason,profiles.mfa,profiles.mfa_required_date,first_patch_reviewed_id,review_request_count,feedback_request_count,needinfo_request_count,comment_count,creation_ts,first_patch_bug_id,last_activity_ts,last_statistics_ts FROM profiles WHERE login_name = ?"] at /app/Bugzilla/Object.pm line 157. From Review (I think): DBD::mysql::db selectrow_hashref failed: Unknown column 'review_request_count' in 'field list' [for Statement "SELECT profiles.userid,profiles.login_name,profiles.realname,profiles.mybugslink AS showmybugslink,profiles.disabledtext,profiles.disable_mail,profiles.extern_id,profiles.is_enabled,DATE_FORMAT(last_seen_date, '%Y-%m-%d') AS last_seen_date,profiles.password_change_required,profiles.password_change_reason,profiles.mfa,profiles.mfa_required_date,review_request_count,feedback_request_count,needinfo_request_count,comment_count,creation_ts,first_patch_bug_id,last_activity_ts,last_statistics_ts FROM profiles WHERE login_name = ?"] at/app/Bugzilla/Object.pm line 157. Error: Exited with code 255
Looks like this is called from: Bugzilla::Object::_load_from_db("Bugzilla::User", HASH(0x7bc0d90)) called at /app/Bugzilla/Object.pm line 84 Bugzilla::Object::new("Bugzilla::User", HASH(0x7bc0d90)) called at /app/Bugzilla/User.pm line 251 Bugzilla::User::new("Bugzilla::User", HASH(0x7bc0d90)) called at /app/Bugzilla/Object.pm line 312 Bugzilla::Object::check("Bugzilla::User", "nobody\@mozilla.org") called at /app/Bugzilla/Install/DB.pm line 3894 Bugzilla::Install::DB::_migrate_group_owners() called at /app/Bugzilla/Install/DB.pm line 750 Bugzilla::Install::DB::update_table_definitions(HASH(0x2e108a8)) called at checksetup.pl line 244
Attached file PR
Okay, that error is fixed by this PR.
Assignee: installation → dylan
If someone else wants to work on this... start off the patch in the attached pull request. Install the docker and the circleci command line tool https://docs.docker.com/engine/installation/ (CE, of course) https://circleci.com/docs/2.0/local-jobs/#installing-the-cli-locally and basically the game is running circleci build --job migrate_4.2_mysql and trying to understand the error message enough to make a change, and then running the circleci command again. Do this until it doesn't fail. I want to work on this, but it's a medium priority so someone that takes this would be a real hero. :-)
Assignee: dylan → installation
Mentor: dylan
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: