SUMO: run sql to migrate mobile users and mobile support forum

VERIFIED FIXED

Status

mozilla.org Graveyard
Server Operations
--
blocker
VERIFIED FIXED
8 years ago
3 years ago

People

(Reporter: paulc, Assigned: oremj)

Tracking

Details

(URL)

(Reporter)

Description

8 years ago
We need to run some SQL to insert users and forum questions/answers on stage, to make sure it's ready for our push. Please resync stage from a prod database beforehand.

This needs to be done before 4pm, at which point we need to do it on production.

I've got the SQL in my home folder on khan right now. For privacy reasons, I can't attach it here. Let me know if that's fine, or we can talk about where would be a good place.
Sorry for upping this but it needs to happen before our push, and critical could be too late.

The SQL files are in /home/pcraciunoiu/migrate_mobile on khan, named m_users.sql and m_questions.sql. m_users *must* go before m_questions.
Severity: critical → blocker
(Assignee)

Updated

8 years ago
Assignee: server-ops → jeremy.orem+bugs
(Assignee)

Comment 2

8 years ago
Ran. I forgot to add -v, so there was no output.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Reporter)

Comment 3

8 years ago
This doesn't look fixed. I'm seeing neither new users nor new content.

You can try this SQL to check:
SELECT id, title FROM questions_question WHERE id = 500001;
It should return 1 row.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 4

8 years ago
Database changed
mysql> SELECT id, title FROM questions_question WHERE id = 500001;
+--------+--------------------------------------------------+
| id     | title                                            |
+--------+--------------------------------------------------+
| 500001 | firefox clarity and screen expansion on the ipad | 
+--------+--------------------------------------------------+
1 row in set (0.00 sec)
(Reporter)

Comment 5

8 years ago
So this is not on stage:
https://support-stage.mozilla.com/en-US/questions/500001
... but wait, I just realized it's because you ran it on production:
http://support.mozilla.com/en-US/questions/500001

We may be able to keep this data. I'll grab a database dump tomorrow morning and check that it looks good.

Since there was no output, it's safe to assume there were no errors?
(In reply to comment #5)
> Since there was no output, it's safe to assume there were no errors?

If it was wrapped in transactions and it's there--and there were no schema changes--then we're good.

Maybe we did the migration anyway, and a little early.
(Reporter)

Comment 7

8 years ago
Yep, I'm just gonna check that the questions are owned by the right users. If they're not, we might be able to do a one-liner SQL to fix that.

Changing bug summary to reflect what actually happened, and calling it fixed. Will file a separate one if I find any inconsistency in the data.
Status: REOPENED → RESOLVED
Last Resolved: 8 years ago8 years ago
Resolution: --- → FIXED
Summary: SUMO stage: run sql to migrate mobile users and mobile support forum → SUMO: run sql to migrate mobile users and mobile support forum
Verified questions are moved over- did not verify that they were the right users. Please re-open if that's the case.
Status: RESOLVED → VERIFIED
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.