Page MenuHomePhabricator

Add gb_target_central_id to the globalblocks table on the centralauth DB
Closed, ResolvedPublic

Description

  1. ALTERs to run: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/GlobalBlocking/+/bdfa4a01272c793e190cbbf0169104a1f9a385e8/sql/mysql/patch-add-gb_target_central_id.sql
  2. Where to run those changes: Per T230055, only centralauth
  3. When to run those changes: At any time
  4. If the schema change is backwards compatible: Yes.
  5. If the schema change has been tested already on some of the test/beta wikis: This change has been applied to the betawikis by myself manually (see paste below for details).
  6. If the data should be made available on the labs replicas and/or dumps: As far as I am aware this table is public and I see no reason for this column not to be on labs replicas and/or dumps.
The output of describe globalblocks; from betawikis
MariaDB [centralauth]> describe globalblocks;
+----------------------+------------------+------+-----+---------+----------------+
| Field                | Type             | Null | Key | Default | Extra          |
+----------------------+------------------+------+-----+---------+----------------+
| gb_id                | int(11)          | NO   | PRI | NULL    | auto_increment |
| gb_address           | varchar(255)     | NO   | MUL | NULL    |                |
| gb_by                | varchar(255)     | NO   |     | NULL    |                |
| gb_by_wiki           | varbinary(255)   | NO   |     | NULL    |                |
| gb_reason            | varbinary(767)   | NO   |     | NULL    |                |
| gb_timestamp         | binary(14)       | NO   | MUL | NULL    |                |
| gb_anon_only         | tinyint(1)       | NO   |     | 0       |                |
| gb_expiry            | varbinary(14)    | NO   | MUL |         |                |
| gb_range_start       | varbinary(32)    | NO   | MUL | NULL    |                |
| gb_range_end         | varbinary(32)    | NO   |     | NULL    |                |
| gb_by_central_id     | int(10) unsigned | YES  |     | NULL    |                |
| gb_target_central_id | int(10) unsigned | NO   | MUL | 0       |                |
+----------------------+------------------+------+-----+---------+----------------+
12 rows in set (0.003 sec)

Related Objects

StatusSubtypeAssignedTask
In ProgressNiharika
OpenNone
OpenNone
OpenNone
DuplicateNone
OpenSkizzerz
OpenDreamy_Jazz
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedDreamy_Jazz
OpenNone
OpenDreamy_Jazz
OpenNone
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
OpenNone
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
ResolvedMarostegui

Event Timeline

Dreamy_Jazz renamed this task from Add gb_target_central_id to the globalblocks table on WMF wikis to Add gb_target_central_id to the globalblocks table on the centralauth DB.Feb 8 2024, 11:47 AM

Offtopic:

This change has been applied to the betawikis by myself manually (see paste below for details).

if you switch to virtual domains, CA schema changes will happen in beta cluster automatically on the right db.

Marostegui claimed this task.
root@db2118.codfw.wmnet[centralauth]> ALTER TABLE /*_*/globalblocks
    ->   ADD gb_target_central_id INT UNSIGNED DEFAULT 0 NOT NULL;
Query OK, 0 rows affected (1.086 sec)
Records: 0  Duplicates: 0  Warnings: 0

root@db2118.codfw.wmnet[centralauth]> CREATE INDEX gb_target_central_id ON /*_*/globalblocks (gb_target_central_id);
Query OK, 0 rows affected (0.131 sec)
Records: 0  Duplicates: 0  Warnings: 0

Mentioned in SAL (#wikimedia-operations) [2024-02-08T15:05:09Z] <marostegui> dbmaint (retroactive logging) Schema change on s7@codfw T356987