Extract schema migration code from checksetup.pl and expose via docker container command

RESOLVED FIXED

Status

()

P2
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: dylan, Assigned: dylan)

Tracking

Production

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

This error is because checksetup.pl isn't run at container startup.
I think it's probably for the best, as the thought of a dozen or so containers all trying to update the schema at the same time is ... worrisome.

DBD::mysql::db selectall_arrayref failed: Unknown column 'profiles.mfa_required_date' 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  userid IN (?,?,?,?)   ORDER BY login_name"] at /app/Bugzilla/Object.pm line 427. 

I'll add 'checksetup' command to entrypoint.pl,
which will need to be run by the deployment system somehow.
(Assignee)

Updated

a year ago
Summary: Add command to docker container for schema migrations → Add command to docker container for schema / data migrations
(Assignee)

Comment 1

a year ago
Created attachment 8912921 [details] [review]
PR

This took much longer setup for test than to write.
(Assignee)

Updated

a year ago
Summary: Add command to docker container for schema / data migrations → Extract schema migration code from checksetup.pl and expose via docker container command
(Assignee)

Updated

a year ago
Priority: -- → P2
as per our discussion, this needn't block the cloud migration, and can probably be WONTFIXed as you can invoke checksetup as entrypoint args.
No longer blocks: 1361440
(Assignee)

Updated

a year ago
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.