Closed Bug 1030929 Opened 5 years ago Closed 5 years ago

[mozillians] Fix database migration for "Country Error"

Categories

(Infrastructure & Operations Graveyard :: WebOps: Engagement, task)

task
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sancus, Assigned: cturra)

References

(Blocks 1 open bug)

Details

(Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/446] )

Somehow the database migration that adds a "Country Error" record to the database didn't run properly on prod. It ran properly on dev/stage *shrug*. Lets just cycle it.

1) ./manage.py migrate geo 0003
2) ./manage.py migrate geo 

And done!

To confirm it's there you can run sql:
select * from geo_country where code='xx';

which should output:

+-----+---------------+------+-----------+
| id  | name          | code | mapbox_id |
+-----+---------------+------+-----------+
| 139 | Country Error | xx   | geo_error |
+-----+---------------+------+-----------+
1 row in set (0.00 sec)
Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/445]
Whiteboard: [kanban:https://kanbanize.com/ctrl_board/4/445] → [kanban:https://kanbanize.com/ctrl_board/4/446]
Assignee: server-ops-webops → cturra
(In reply to Andrei Hajdukewycz [:sancus] from comment #0)
> 
> 1) ./manage.py migrate geo 0003
> 2) ./manage.py migrate geo 

i ran these as requested and this is the results on the database...

 mysql> select * from geo_country where code='xx';
 Empty set (0.00 sec)


look as expected?
Flags: needinfo?(sancus)
No.. it should be creating that row. I'm really confused why it wouldn't be able to...
Flags: needinfo?(sancus)
Manually creating this via the python shell worked. No idea why the migration didn't, but as long as this record is there, our error code should work.

Thanks.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Blocks: 920651
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.