Closed
Bug 395088
Opened 19 years ago
Closed 19 years ago
AMO production SQL changes
Categories
(Infrastructure & Operations Graveyard :: WebOps: Other, task)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wenzel, Assigned: oremj)
References
Details
Please apply the SQL needed for developers' replies to user reviews on AMO (from bug 376766) to AMO's production DB:
https://bugzilla.mozilla.org/attachment.cgi?id=275790
Thanks.
| Assignee | ||
Updated•19 years ago
|
Assignee: server-ops → oremj
| Assignee | ||
Comment 1•19 years ago
|
||
mysql> ALTER TABLE `reviews` ADD `reply_to` INT( 11 ) UNSIGNED NULL DEFAULT NULL AFTER `user_id` ;
` `rating` TINYINT UNSIGNED NULL DEFAULT NULL;
ALTER TABLE `reviews` ADD UNIQUE (`reply_to`);
ALTER TABLE `reviews` ADD CONSTRAINT `reviews_reply` FOREIGN KEY (`reply_to`) REFERENCES `reviews` (`id`) ON DELETE CASCADE;
ALTER TABLE `reviews` DROP INDEX `one_review_per_user` , ADD UNIQUE `one_review_per_user` ( `version_id` , `user_id` , `reply_to` );Query OK, 6055 rows affected (0.38 sec)
Records: 6055 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE `reviews` CHANGE `rating` `rating` TINYINT UNSIGNED NULL DEFAULT NULL;
Query OK, 6055 rows affected (0.25 sec)
Records: 6055 Duplicates: 0 Warnings: 0
mysql>
mysql> ALTER TABLE `reviews` ADD UNIQUE (`reply_to`);
Query OK, 6055 rows affected (0.27 sec)
Records: 6055 Duplicates: 0 Warnings: 0
mysql>
mysql> ALTER TABLE `reviews` ADD CONSTRAINT `reviews_reply` FOREIGN KEY (`reply_to`) REFERENCES `reviews` (`id`) ON DELETE CASCADE;
Query OK, 6055 rows affected (0.23 sec)
Records: 6055 Duplicates: 0 Warnings: 0
mysql>
mysql> ALTER TABLE `reviews` DROP INDEX `one_review_per_user` , ADD UNIQUE `one_review_per_user` ( `version_id` , `user_id` , `reply_to` );
Query OK, 6055 rows affected (0.30 sec)
Records: 6055 Duplicates: 0 Warnings: 0
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
Updated•7 years ago
|
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•