Correct the schema to make revision id columns of cx_translations nullable
Closed, ResolvedPublic

Description

This is followup of T119752: Review schema changes for T119495 in which the sql script executed was from an older patchset and made the added columns not-nullable.

Please correct it by making it nullable as follows

ALTER TABLE /*_*/cx_translations
MODIFY translation_source_revision_id INT UNSIGNED NULL,
MODIFY translation_target_revision_id INT UNSIGNED NULL;

There is no gerrit patch related to this since the patchset https://gerrit.wikimedia.org/r/#/c/255662 has correct script.

santhosh updated the task description. (Show Details)
santhosh raised the priority of this task from to Normal.
santhosh assigned this task to jcrespo.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 15 2015, 11:15 AM
santhosh renamed this task from Correct the schema to make revision id columns nullable to Correct the schema to make revision id columns of cx_translations nullable.
santhosh set Security to None.
Amire80 raised the priority of this task from Normal to High.Dec 16 2015, 12:59 PM
Amire80 moved this task from Backlog to CX7 on the ContentTranslation board.Dec 16 2015, 1:42 PM

Current state, check that it is right:

mysql -h x1-master wikishared -e "SHOW CREATE TABLE cx_translations\G"
*************************** 1. row ***************************
       Table: cx_translations
Create Table: CREATE TABLE `cx_translations` (
  `translation_id` int(11) NOT NULL AUTO_INCREMENT,
  `translation_source_title` varbinary(512) NOT NULL,
  `translation_target_title` varbinary(512) NOT NULL,
  `translation_source_language` varbinary(36) NOT NULL,
  `translation_target_language` varbinary(36) NOT NULL,
  `translation_source_url` blob NOT NULL,
  `translation_target_url` blob,
  `translation_status` enum('draft','published','deleted') DEFAULT NULL,
  `translation_start_timestamp` varbinary(14) NOT NULL,
  `translation_last_updated_timestamp` varbinary(14) NOT NULL,
  `translation_progress` tinyblob NOT NULL,
  `translation_started_by` int(11) DEFAULT NULL,
  `translation_last_update_by` int(11) DEFAULT NULL,
  `translation_source_revision_id` int(10) unsigned DEFAULT NULL,
  `translation_target_revision_id` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`translation_id`),
  UNIQUE KEY `cx_translation_pair` (`translation_source_title`,`translation_source_language`,`translation_target_language`),
  KEY `cx_translation_languages` (`translation_source_language`,`translation_target_language`)
) ENGINE=InnoDB AUTO_INCREMENT=95914 DEFAULT CHARSET=binary
jcrespo moved this task from Triage to Done on the DBA board.Dec 17 2015, 11:23 AM
jcrespo moved this task from Backlog to Done on the Blocked-on-schema-change board.
jcrespo closed this task as Resolved.Dec 17 2015, 11:49 AM
KartikMistry moved this task from Backlog to Done on the LE-CX7-Sprint 4 board.Dec 21 2015, 6:29 AM