Page MenuHomePhabricator

CentralNotice: Update DB schema on Meta for campaign types feature
Closed, ResolvedPublic

Description

  1. Alter tables to apply:
  2. Wikis to apply to:
    • metawiki
    • testwiki
  3. No specific time window required. (Code that requires the new columns will be deployed after schema change is applied.)
  4. Change is backwards compatible with current production code.
  5. Change has been tested on the beta cluster.
  6. Data is not sensitive or private, and can be made available on lab replicas and dumps.

Thanks so much!!!

Progress:

  • metawiki (s7)
  • testwiki (s3)

Event Timeline

Marostegui triaged this task as Medium priority.Jan 26 2021, 6:27 AM
Marostegui moved this task from Triage to Ready on the DBA board.

Mentioned in SAL (#wikimedia-operations) [2021-01-26T16:50:15Z] <marostegui> Deploy schema change on testwiki - T272953

testwiki is done:

# mysql.py -hdb1123 testwiki -e "show create table cn_notice_log\G show create table cn_notices\G"
*************************** 1. row ***************************
       Table: cn_notice_log
Create Table: CREATE TABLE `cn_notice_log` (
  `notlog_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `notlog_timestamp` binary(14) NOT NULL,
  `notlog_user_id` int(10) unsigned NOT NULL,
  `notlog_action` enum('created','modified','removed') NOT NULL DEFAULT 'modified',
  `notlog_not_id` int(10) unsigned NOT NULL,
  `notlog_not_name` varbinary(255) DEFAULT NULL,
  `notlog_begin_projects` varbinary(255) DEFAULT NULL,
  `notlog_end_projects` varbinary(255) DEFAULT NULL,
  `notlog_begin_languages` blob,
  `notlog_end_languages` blob,
  `notlog_begin_countries` blob,
  `notlog_end_countries` blob,
  `notlog_begin_start` binary(14) DEFAULT NULL,
  `notlog_end_start` binary(14) DEFAULT NULL,
  `notlog_begin_end` binary(14) DEFAULT NULL,
  `notlog_end_end` binary(14) DEFAULT NULL,
  `notlog_begin_enabled` tinyint(1) DEFAULT NULL,
  `notlog_end_enabled` tinyint(1) DEFAULT NULL,
  `notlog_begin_preferred` tinyint(1) DEFAULT NULL,
  `notlog_end_preferred` tinyint(1) DEFAULT NULL,
  `notlog_begin_locked` tinyint(1) DEFAULT NULL,
  `notlog_end_locked` tinyint(1) DEFAULT NULL,
  `notlog_begin_geo` tinyint(1) DEFAULT NULL,
  `notlog_end_geo` tinyint(1) DEFAULT NULL,
  `notlog_begin_banners` blob,
  `notlog_end_banners` blob,
  `notlog_begin_buckets` tinyint(1) DEFAULT NULL,
  `notlog_end_buckets` tinyint(1) DEFAULT NULL,
  `notlog_begin_mobile_carrier` int(11) DEFAULT NULL,
  `notlog_end_mobile_carrier` int(11) DEFAULT NULL,
  `notlog_begin_weight` int(11) DEFAULT NULL,
  `notlog_end_weight` int(11) DEFAULT NULL,
  `notlog_begin_archived` tinyint(4) DEFAULT NULL,
  `notlog_end_archived` tinyint(4) DEFAULT NULL,
  `notlog_comment` varbinary(255) DEFAULT NULL,
  `notlog_begin_throttle` int(11) DEFAULT NULL,
  `notlog_end_throttle` int(11) DEFAULT NULL,
  `notlog_begin_mixins` blob,
  `notlog_end_mixins` blob,
  `notlog_begin_regions` blob,
  `notlog_end_regions` blob,
  `notlog_begin_type` varbinary(255) DEFAULT NULL,
  `notlog_end_type` varbinary(255) DEFAULT NULL,
  PRIMARY KEY (`notlog_id`),
  KEY `notlog_timestamp` (`notlog_timestamp`),
  KEY `notlog_user_id` (`notlog_user_id`,`notlog_timestamp`),
  KEY `notlog_not_id` (`notlog_not_id`,`notlog_timestamp`)
) ENGINE=InnoDB AUTO_INCREMENT=282 DEFAULT CHARSET=binary
*************************** 1. row ***************************
       Table: cn_notices
Create Table: CREATE TABLE `cn_notices` (
  `not_id` int(11) NOT NULL AUTO_INCREMENT,
  `not_name` varbinary(255) NOT NULL DEFAULT '',
  `not_start` varbinary(14) NOT NULL DEFAULT '',
  `not_end` varbinary(14) NOT NULL DEFAULT '',
  `not_enabled` tinyint(1) NOT NULL DEFAULT '0',
  `not_preferred` tinyint(1) NOT NULL DEFAULT '0',
  `not_locked` tinyint(1) NOT NULL DEFAULT '0',
  `not_geo` tinyint(1) NOT NULL DEFAULT '0',
  `not_buckets` tinyint(1) NOT NULL DEFAULT '1',
  `not_weight` int(11) NOT NULL DEFAULT '100',
  `not_mobile_carrier` tinyint(1) NOT NULL DEFAULT '0',
  `not_archived` tinyint(1) NOT NULL DEFAULT '0',
  `not_throttle` int(11) NOT NULL DEFAULT '100',
  `not_type` varbinary(255) DEFAULT NULL,
  PRIMARY KEY (`not_id`)
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=binary
Reedy renamed this task from CentralNotice: Update DB schema on Meta for campign types feature to CentralNotice: Update DB schema on Meta for campaign types feature.Jan 26 2021, 9:09 PM

testwiki is done:

Ahh cool thanks so much!! Yeah looks good to me! :D

Marostegui moved this task from Backlog to In progress on the Blocked-on-schema-change board.
Marostegui moved this task from Ready to In progress on the DBA board.
Marostegui updated the task description. (Show Details)

Change applied to metawiki

Change applied to metawiki

Cool beans, thanks so much!! :D