Closed Bug 422035 Opened 16 years ago Closed 16 years ago

Run SQL for AMO databases

Categories

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

All
Other
task
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: morgamic, Assigned: oremj)

Details

Need to run the following SQL for prod, preview.addons.mozilla.org and remora-reskin.stage.mozilla.com:

alter table tags add weight int(11) not null default 0 after application_id;

This simply adds a column to the tags table that will be used in the future for category ordering.
Note: change is from bug 412645.
Does this need a downtime window?
Assignee: server-ops → aravind
No it's an added column.
Could we run this in the next few hours?
Assignee: aravind → oremj
mysql> alter table tags add weight int(11) not null default 0 after application_id;
Query OK, 63 rows affected (0.10 sec)
Records: 63  Duplicates: 0  Warnings: 0

Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Did you run it on the other db's mentioned:
Need to run the following SQL for prod, preview.addons.mozilla.org and
remora-reskin.stage.mozilla.com
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Okay, done.
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Need some additional SQL from bug 416779:

 ALTER TABLE `addons` ADD `target_locale` VARCHAR( 255 ) NULL AFTER `nominationmessage` , ADD `locale_disambiguation` VARCHAR( 255 ) NULL AFTER `target_locale` ;
 ALTER TABLE `addons` ADD INDEX ( `target_locale` );
 UPDATE `addons` SET `target_locale` = SUBSTRING_INDEX(`guid`, '@', 1) WHERE addontype_id = 3;

Jeremy - could you run this on preview and remora-reskin?
mysql>  ALTER TABLE `addons` ADD `target_locale` VARCHAR( 255 ) NULL AFTER
    -> `nominationmessage` , ADD `locale_disambiguation` VARCHAR( 255 ) NULL AFTER
    -> `target_locale` ;

Query OK, 5492 rows affected (1.37 sec)
Records: 5492  Duplicates: 0  Warnings: 0

mysql>  ALTER TABLE `addons` ADD INDEX ( `target_locale` );
Query OK, 5492 rows affected (2.61 sec)
Records: 5492  Duplicates: 0  Warnings: 0

mysql>  UPDATE `addons` SET `target_locale` = SUBSTRING_INDEX(`guid`, '@', 1) WHERE
    -> addontype_id = 3;
Query OK, 73 rows affected (0.26 sec)
Rows matched: 73  Changed: 73  Warnings: 0
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.