Page MenuHomePhabricator

Update beta to use the new tracking tools schema
Open, Needs TriagePublic

Description

Once the schema has been created in the code, and before enabling it to production, it should be tested on beta.

Checklist

$ sql wikishared --write
CREATE TABLE ce_tracking_tools (
  cett_id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
  cett_event BIGINT UNSIGNED NOT NULL,
  cett_tool_id INT NOT NULL,
  cett_tool_event_id VARBINARY(512) NOT NULL,
  cett_sync_status INT NOT NULL,
  cett_last_sync BINARY(14) DEFAULT NULL,
  UNIQUE INDEX cett_event_tool_teid (
    cett_event, cett_tool_id, cett_tool_event_id
  ),
  PRIMARY KEY(cett_id)
);
  • Configure beta to read/write the new schema
  • Wait until the old columns and the migration logic have been dropped in the code
  • Drop the old columns:
$ sql wikishared --write
ALTER TABLE campaign_events DROP COLUMN event_tracking_tool_id, DROP COLUMN event_tracking_tool_event_id;
  • Remove the migration variable from the beta config

Event Timeline

Change 922800 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[operations/mediawiki-config@master] [beta] Set $wgCampaignEventsUseNewTrackingToolsSchema to true

https://gerrit.wikimedia.org/r/922800

Mentioned in SAL (#wikimedia-releng) [2023-05-24T09:24:37Z] <Daimona> Creating new DB table on beta wikishared for the CampaignEvents extension # T336362

Change 922800 merged by jenkins-bot:

[operations/mediawiki-config@master] [beta] Set $wgCampaignEventsUseNewTrackingToolsSchema to true

https://gerrit.wikimedia.org/r/922800