AMO Update to push 4.0.2 changes

VERIFIED FIXED

Status

--
minor
VERIFIED FIXED
10 years ago
5 years ago

People

(Reporter: morgamic, Assigned: oremj)

Tracking

Details

(Reporter)

Description

10 years ago
We will need to do an update tonight during the usual time to push 4.0.2 changes.  Instructions to follow, no downtime is expected.
(Reporter)

Comment 1

10 years ago
Database changes that need to happen in prod:
https://wiki.mozilla.org/Update:Developers/Database_Changes#4.0.3

CREATE TABLE `reviews_moderation_flags` (
 `id` int(11) NOT NULL auto_increment,
 `review_id` int(11) unsigned NOT NULL default '0',
 `user_id` int(11) unsigned NOT NULL default '0',
 `flag_name` varchar(64) NOT NULL default 'review_flag_reason_other',
 `flag_notes` varchar(100) NOT NULL default "",
 `created` datetime NOT NULL default '0000-00-00 00:00:00',
 `modified` datetime NOT NULL default '0000-00-00 00:00:00',
 PRIMARY KEY  (`id`),
 UNIQUE KEY `index_review_user` (`review_id`,`user_id`),
 KEY `index_user` (`user_id`),
 KEY `index_review` (`review_id`),
 KEY `index_modified` (`modified`),
 CONSTRAINT `reviews_moderation_flags_ibfk_1` FOREIGN KEY (`review_id`) REFERENCES `reviews` (`id`),
 CONSTRAINT `reviews_moderation_flags_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `collections` (
 `id` int(11) unsigned NOT NULL auto_increment,
 `name` int(11) unsigned NOT NULL,
 `description` int(11) unsigned NOT NULL,
 `access` tinyint(1) NOT NULL DEFAULT '0',
 `listed` tinyint(1) NOT NULL DEFAULT '1',
 `password` varchar(255) NOT NULL,
 `subscribers` int(11) unsigned NOT NULL DEFAULT '0',
 `created` datetime NOT NULL default '0000-00-00 00:00:00',
 `modified` datetime NOT NULL default '0000-00-00 00:00:00',
 `addontype_id` int(11) unsigned NOT NULL,
 PRIMARY KEY `id` (`id`),
 INDEX (`listed`),
 CONSTRAINT `collections_addontype_ibfk_1` FOREIGN KEY (`addontype_id`) REFERENCES `addontypes`(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE `addons_collections` (
 `addon_id` int(11) unsigned NOT NULL ,
 `collection_id` int(11) unsigned NOT NULL ,
 `added` datetime NOT NULL default '0000-00-00 00:00:00',
 PRIMARY KEY ( `addon_id` , `collection_id` ),
 KEY `addon_id` (`addon_id`),
 KEY `collection_id` (`collection_id`),
 CONSTRAINT `addons_collections_ibfk_1` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`),
 CONSTRAINT `addons_collections_ibfk_2` FOREIGN KEY (`collection_id`) REFERENCES `collections` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE `collections_tags` (
 `collection_id` int(11) unsigned NOT NULL ,
 `tag_id` int(11) unsigned NOT NULL ,
 PRIMARY KEY ( `collection_id` , `tag_id` ),
 KEY `collection_id` (`collection_id`),
 KEY `tag_id` (`tag_id`),
 CONSTRAINT `collections_tags_ibfk_1` FOREIGN KEY (`collection_id`) REFERENCES `addons` (`id`),
 CONSTRAINT `collections_tags_ibfk_2` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
(Reporter)

Comment 2

10 years ago
Instructions:
1) run the SQL above
2) svn up (if site/app/app_controller.php conflicts, blow it away)
3) delete model cache in tmp/cache/models (delete all cache files)
4) flush memcache and ns cache
Please also run:

create index expires on cake_sessions(expires);
(Reporter)

Comment 4

10 years ago
Hey, is someone around to help us with this tonight?
(Assignee)

Updated

10 years ago
Assignee: server-ops → oremj
(Assignee)

Comment 5

10 years ago
mysql> CREATE TABLE `reviews_moderation_flags` (
    ->  `id` int(11) NOT NULL auto_increment,
    ->  `review_id` int(11) unsigned NOT NULL default '0',
    ->  `user_id` int(11) unsigned NOT NULL default '0',
    ->  `flag_name` varchar(64) NOT NULL default 'review_flag_reason_other',
    ->  `flag_notes` varchar(100) NOT NULL default "",
    ->  `created` datetime NOT NULL default '0000-00-00 00:00:00',
    ->  `modified` datetime NOT NULL default '0000-00-00 00:00:00',
    ->  PRIMARY KEY  (`id`),
    ->  UNIQUE KEY `index_review_user` (`review_id`,`user_id`),
    ->  KEY `index_user` (`user_id`),
    ->  KEY `index_review` (`review_id`),
    ->  KEY `index_modified` (`modified`),
    ->  CONSTRAINT `reviews_moderation_flags_ibfk_1` FOREIGN KEY (`review_id`)
    -> REFERENCES `reviews` (`id`),
    ->  CONSTRAINT `reviews_moderation_flags_ibfk_2` FOREIGN KEY (`user_id`)
    -> REFERENCES `users` (`id`)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.08 sec)

mysql> CREATE TABLE `collections` (
    ->  `id` int(11) unsigned NOT NULL auto_increment,
    ->  `name` int(11) unsigned NOT NULL,
    ->  `description` int(11) unsigned NOT NULL,
    ->  `access` tinyint(1) NOT NULL DEFAULT '0',
    ->  `listed` tinyint(1) NOT NULL DEFAULT '1',
    ->  `password` varchar(255) NOT NULL,
    ->  `subscribers` int(11) unsigned NOT NULL DEFAULT '0',
    ->  `created` datetime NOT NULL default '0000-00-00 00:00:00',
    ->  `modified` datetime NOT NULL default '0000-00-00 00:00:00',
    ->  `addontype_id` int(11) unsigned NOT NULL,
    ->  PRIMARY KEY `id` (`id`),
    ->  INDEX (`listed`),
    ->  CONSTRAINT `collections_addontype_ibfk_1` FOREIGN KEY (`addontype_id`)
    -> REFERENCES `addontypes`(`id`)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
Query OK, 0 rows affected (0.02 sec)

mysql> CREATE TABLE `addons_collections` (
    ->  `addon_id` int(11) unsigned NOT NULL ,
    ->  `collection_id` int(11) unsigned NOT NULL ,
    ->  `added` datetime NOT NULL default '0000-00-00 00:00:00',
    ->  PRIMARY KEY ( `addon_id` , `collection_id` ),
    ->  KEY `addon_id` (`addon_id`),
    ->  KEY `collection_id` (`collection_id`),
    ->  CONSTRAINT `addons_collections_ibfk_1` FOREIGN KEY (`addon_id`) REFERENCES
    -> `addons` (`id`),
    ->  CONSTRAINT `addons_collections_ibfk_2` FOREIGN KEY (`collection_id`)
    -> REFERENCES `collections` (`id`)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE `collections_tags` (
    ->  `collection_id` int(11) unsigned NOT NULL ,
    ->  `tag_id` int(11) unsigned NOT NULL ,
    ->  PRIMARY KEY ( `collection_id` , `tag_id` ),
    ->  KEY `collection_id` (`collection_id`),
    ->  KEY `tag_id` (`tag_id`),
    ->  CONSTRAINT `collections_tags_ibfk_1` FOREIGN KEY (`collection_id`) REFERENCES
    -> `addons` (`id`),
    ->  CONSTRAINT `collections_tags_ibfk_2` FOREIGN KEY (`tag_id`) REFERENCES `tags`
    -> (`id`)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
Query OK, 0 rows affected (0.00 sec)
(Assignee)

Comment 6

10 years ago
create index expires on cake_sessions(expires);
Query OK, 16804 rows affected (1.19 sec)
Records: 16804  Duplicates: 0  Warnings: 0


 U   .

Fetching external item into 'site'
U    site/app/views/reviews/display.thtml
U    site/app/views/admin/users_edit.thtml
U    site/app/views/addons/home.thtml
U    site/app/views/addons/category_landing.thtml
U    site/app/views/addons/plugins.thtml
U    site/app/views/editors/reviews_queue.thtml
U    site/app/views/api/api_addon.thtml
A    site/app/views/collections
A    site/app/views/collections/display.thtml
A    site/app/views/collections/index.thtml
U    site/app/locale/sv_SE/LC_MESSAGES/messages.mo
U    site/app/locale/sv_SE/LC_MESSAGES/messages.po
U    site/app/locale/uk/LC_MESSAGES/messages.mo
U    site/app/locale/uk/LC_MESSAGES/messages.po
U    site/app/locale/sq/LC_MESSAGES/messages.mo
U    site/app/locale/sq/LC_MESSAGES/messages.po
U    site/app/locale/da/glossary.txt
U    site/app/locale/da/LC_MESSAGES/messages.mo
U    site/app/locale/da/LC_MESSAGES/da.txt
U    site/app/locale/da/LC_MESSAGES/messages.po
U    site/app/locale/da/LC_MESSAGES/en-US.txt
U    site/app/locale/fa/LC_MESSAGES/messages.mo
U    site/app/locale/fa/LC_MESSAGES/messages.po
U    site/app/locale/de/LC_MESSAGES/messages.mo
U    site/app/locale/de/LC_MESSAGES/messages.po
U    site/app/locale/ja/LC_MESSAGES/messages.mo
U    site/app/locale/ja/LC_MESSAGES/messages.po
U    site/app/locale/he/LC_MESSAGES/messages.mo
U    site/app/locale/he/LC_MESSAGES/messages.po
U    site/app/locale/es_ES/LC_MESSAGES/messages.mo
U    site/app/locale/es_ES/LC_MESSAGES/messages.po
U    site/app/locale/fi/LC_MESSAGES/messages.mo
U    site/app/locale/fi/LC_MESSAGES/messages.po
U    site/app/locale/pt_BR/LC_MESSAGES/messages.mo
U    site/app/locale/pt_BR/LC_MESSAGES/messages.po
U    site/app/locale/fr/LC_MESSAGES/messages.mo
U    site/app/locale/fr/LC_MESSAGES/messages.po
U    site/app/locale/nl/LC_MESSAGES/messages.mo
U    site/app/locale/nl/LC_MESSAGES/messages.po
U    site/app/locale/pl/LC_MESSAGES/messages.mo
U    site/app/locale/pl/LC_MESSAGES/messages.po
U    site/app/locale/hu/LC_MESSAGES/messages.po
U    site/app/locale/ro/LC_MESSAGES/messages.mo
U    site/app/locale/ro/LC_MESSAGES/messages.po
U    site/app/locale/ca/LC_MESSAGES/messages.mo
U    site/app/locale/ca/LC_MESSAGES/messages.po
U    site/app/locale/tr/LC_MESSAGES/messages.po
A    site/app/locale/af
A    site/app/locale/af/pages
A    site/app/locale/af/LC_MESSAGES
A    site/app/locale/af/LC_MESSAGES/messages.mo
A    site/app/locale/af/LC_MESSAGES/messages.po
A    site/app/locale/af/images
U    site/app/locale/pt_PT/LC_MESSAGES/messages.mo
U    site/app/locale/pt_PT/LC_MESSAGES/messages.po
U    site/app/locale/ru/LC_MESSAGES/messages.mo
U    site/app/locale/ru/LC_MESSAGES/messages.po
U    site/app/locale/zh_TW/LC_MESSAGES/messages.mo
U    site/app/locale/zh_TW/LC_MESSAGES/messages.po
U    site/app/locale/id/LC_MESSAGES/messages.mo
U    site/app/locale/id/LC_MESSAGES/messages.po
U    site/app/locale/el/pages/reviewguide.thtml
U    site/app/locale/el/LC_MESSAGES/messages.mo
U    site/app/locale/el/LC_MESSAGES/messages.po
U    site/app/locale/zh_CN/LC_MESSAGES/messages.mo
U    site/app/locale/zh_CN/LC_MESSAGES/messages.po
U    site/app/locale/ga_IE/LC_MESSAGES/messages.mo
U    site/app/locale/ga_IE/LC_MESSAGES/messages.po
U    site/app/locale/cs/LC_MESSAGES/messages.mo
U    site/app/locale/cs/LC_MESSAGES/messages.po
A    site/app/locale/fy_NL
A    site/app/locale/fy_NL/pages
A    site/app/locale/fy_NL/LC_MESSAGES
A    site/app/locale/fy_NL/LC_MESSAGES/messages.mo
A    site/app/locale/fy_NL/LC_MESSAGES/messages.po
A    site/app/locale/fy_NL/images
U    site/app/locale/ko/LC_MESSAGES/messages.mo
U    site/app/locale/ko/LC_MESSAGES/messages.po
U    site/app/locale/en_US/LC_MESSAGES/messages.mo
U    site/app/locale/en_US/LC_MESSAGES/messages.po
U    site/app/locale/eu/LC_MESSAGES/messages.mo
U    site/app/locale/eu/LC_MESSAGES/messages.po
U    site/app/locale/mn/LC_MESSAGES/messages.mo
U    site/app/locale/mn/LC_MESSAGES/messages.po
U    site/app/locale/it/LC_MESSAGES/messages.mo
U    site/app/locale/it/LC_MESSAGES/messages.po
U    site/app/locale/sk/LC_MESSAGES/messages.mo
U    site/app/locale/sk/LC_MESSAGES/messages.po
U    site/app/webroot/services/pfs.php
U    site/app/webroot/css/style.css
U    site/app/webroot/css/screen.css
U    site/app/webroot/css/style.min.css
U    site/app/webroot/js/reviews.js
U    site/app/tests/services/pfs.test.php
U    site/app/tests/views/search/index.test.php
A    site/app/models/collection.php
U    site/app/models/addon.php
U    site/app/models/addontype.php
U    site/app/models/memcaching.php
A    site/app/models/reviews_moderation_flag.php
U    site/app/config/sql/remora.sql
U    site/app/config/revisions.php
U    site/app/config/routes.php
U    site/app/controllers/admin_controller.php
U    site/app/controllers/components/search.php
U    site/app/controllers/components/image.php
U    site/app/controllers/developers_controller.php
U    site/app/controllers/editors_controller.php
U    site/app/controllers/api_controller.php
A    site/app/controllers/collections_controller.php
U    site/app/controllers/reviews_controller.php
G    site/app/app_controller.php
U    site/cake/libs/session.php
Updated external to revision 19174.


Fetching external item into 'bin'
U    bin/parse_logs/count_downloads.class.php
U    bin/maintenance.php
Updated external to revision 19174.


Fetching external item into 'site/vendors/product-details'
U    site/vendors/product-details/localeDetails.class.php
U    site/vendors/product-details/productDetails.class.php
U    site/vendors/product-details/history/thunderbirdHistory.class.php
U    site/vendors/product-details/history/firefoxHistory.class.php
U    site/vendors/product-details/firefoxDetails.class.php
U    site/vendors/product-details/thunderbirdDetails.class.php
Updated external to revision 19114.

Updated to revision 19180.
(Assignee)

Comment 7

10 years ago
Done.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Verified; tested a few fixes that were on preview, and they've made it to prod.
Status: RESOLVED → VERIFIED
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
You need to log in before you can comment on or make changes to this bug.