Closed Bug 547999 Opened 15 years ago Closed 15 years ago

"An unexpected error has occurred!" when migrating Live Chat account on staging

Categories

(mozilla.org Graveyard :: Server Operations, task)

task
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zzxc, Assigned: dmoore)

References

Details

Attempting to migrate a valid Live Chat account on https://support-stage.mozilla.com/tiki-livechat_migration.php is resulting in a "An unexpected error has occurred!" error message. (The most likely reason for this is a missing livechat_id column in the users_users table)
Blocks: 503215
Assignee: server-ops → dmoore
You're correct, there is no livechat_id in the users_users table on staging. It's also not present on production. Let us know if there is a required database schema change to support livechat migration.
This was on staging before the branch switch last week, so the column did exist there. The SQL to add it should be: ALTER TABLE users_users ADD COLUMN livechat_id varchar(64); Once this is done, the migration script (bug 541983) needs to be run again, as the column was dropped.
Ah, this was lost when we synced from the latest production database in Bug 547757. We've recreated the column in staging: mysql> ALTER TABLE users_users ADD COLUMN livechat_id varchar(64); Query OK, 159798 rows affected (3.51 sec) Records: 159798 Duplicates: 0 Warnings: 0 Let me know if there is anything else required on the IT side.
Since this column was lost, the automatic migration needs to be run again: 1. Import the latest Openfire production database to chat-support-stage 2. Run tiki-livechat_migration.php again, following https://bugzilla.mozilla.org/show_bug.cgi?id=541982#c15
Database from 02/22 imported (from the same dump as latest SUMO sync) livechat_id zeroed: mysql> UPDATE users_users SET livechat_id=NULL; Query OK, 0 rows affected (2.71 sec) Rows matched: 159798 Changed: 0 Warnings: 0 migration script run: 1a. Updating Tiki database for same-email users... 330 distinct emails... Done. 1c. Removing them from the Openfire database... Done. 3. Creating livechat_id for non-conflicting TikiWiki accounts... 159468 rows...
Filling out the migration script on staging now results in: Success! Migration has completed successfully. You may now sign in to live chat with your newly created livechat ID. ->Fixed
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.