Run SQL on Production AMO

RESOLVED FIXED

Status

RESOLVED FIXED
10 years ago
5 years ago

People

(Reporter: clouserw, Assigned: oremj)

Tracking

Details

(Reporter)

Description

10 years ago
Please run the following:

CREATE TABLE `stats_addons_collections_counts` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `addon_id` int(10) unsigned NOT NULL default '0',
  `collection_id` int(10) unsigned NOT NULL default '0',
  `count` int(10) unsigned NOT NULL default '0',
  `date` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`id`),
  KEY `addon_id` (`addon_id`),
  KEY `collection_id` (`collection_id`),
  KEY `count` (`count`),
  KEY `date` (`date`),
  CONSTRAINT `stats_addons_collections_counts_ibfk_1` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`),
  CONSTRAINT `stats_addons_collections_counts_ibfk_2` FOREIGN KEY (`collection_id`) REFERENCES `collections` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `stats_collections_counts` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `collection_id` int(10) unsigned NOT NULL default '0',
  `count` int(10) unsigned NOT NULL default '0',
  `date` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`id`),
  KEY `collection_id` (`collection_id`),
  KEY `count` (`count`),
  KEY `date` (`date`),
  CONSTRAINT `stats_collections_counts_ibfk_1` FOREIGN KEY (`collection_id`) REFERENCES `collections` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
(Reporter)

Updated

10 years ago
Blocks: 477920
(Assignee)

Updated

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

Comment 1

10 years ago
mysql> CREATE TABLE `stats_addons_collections_counts` (
    ->   `id` int(10) unsigned NOT NULL auto_increment,
    ->   `addon_id` int(10) unsigned NOT NULL default '0',
    ->   `collection_id` int(10) unsigned NOT NULL default '0',
    ->   `count` int(10) unsigned NOT NULL default '0',
    ->   `date` date NOT NULL default '0000-00-00',
    ->   PRIMARY KEY  (`id`),
    ->   KEY `addon_id` (`addon_id`),
    ->   KEY `collection_id` (`collection_id`),
    ->   KEY `count` (`count`),
    ->   KEY `date` (`date`),
    ->   CONSTRAINT `stats_addons_collections_counts_ibfk_1` FOREIGN KEY (`addon_id`)
    -> REFERENCES `addons` (`id`),
    ->   CONSTRAINT `stats_addons_collections_counts_ibfk_2` FOREIGN KEY
    -> (`collection_id`) REFERENCES `collections` (`id`)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.06 sec)

mysql> 
mysql> CREATE TABLE `stats_collections_counts` (
    ->   `id` int(10) unsigned NOT NULL auto_increment,
    ->   `collection_id` int(10) unsigned NOT NULL default '0',
    ->   `count` int(10) unsigned NOT NULL default '0',
    ->   `date` date NOT NULL default '0000-00-00',
    ->   PRIMARY KEY  (`id`),
    ->   KEY `collection_id` (`collection_id`),
    ->   KEY `count` (`count`),
    ->   KEY `date` (`date`),
    ->   CONSTRAINT `stats_collections_counts_ibfk_1` FOREIGN KEY (`collection_id`)
    -> REFERENCES `collections` (`id`)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.01 sec)
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
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.