NOTE: Remove sections that are not needed. Instead, leave the section and write NOT NEEDED as its content.
Task title
- Add new table ce_worklist_articles
Background: The worklist feature requires a dedicated DB table to store articles associated with events. This task creates the ce_worklist_articles table via an abstract schema change in db_patches/abstractSchemaChanges, following the existing CampaignEvents DB patch conventions and generating SQL for each supported DB engine.
Type of story
- Backend
Acceptance criteria
- The migration creates the ce_worklist table with the expected columns (Suggestion below)
NOTE: This is a suggestion and it is up to the engeniering implementing this to use the suggestion or propose something else
CREATE TABLE `ce_worklists` ( `cewl_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `cewl_name` varbinary(255) DEFAULT NULL, `cewl_wiki` varbinary(64) NOT NULL, `cewl_page_prefixedtext` varbinary(255) DEFAULT NULL, `cewl_user_id` bigint(20) unsigned DEFAULT NULL, `cewl_created_at` binary(14) NOT NULL, `cewl_updated_at` binary(14) NOT NULL, PRIMARY KEY (`cewl_id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
Testing required?
- Yes
- Minimum testing to pass QA: The table schema is verified end-to-end by the frontend tasks that exercise the full add/list/delete flow.
- Tested end-to-end in: T423634 (Worklist tab — add article form) and T423655 (article list table)
Technical details
- Use an abstract schema JSON patch in db_patches/abstractSchemaChanges as source of truth, then generate DB-specific SQL files (do not hand-edit generated SQL files).
- Keep the table schema aligned with current CampaignEvents conventions for worklist articles (cewa_* field naming).
- cewa_page_title stores mainspace page title for redlink handling.
- Add index ce_worklist_articles_event_id on cewa_event_id for efficient event-based queries.
- Ensure src/Hooks/Handlers/SchemaChangesHandler.php registers the table creation with addExtensionUpdateOnVirtualDomain( ..., 'addTable', 'ce_worklist_articles', "$dir/$dbType/patch-add-ce_worklist_articles.sql", ... ) so update.php applies it in the CampaignEvents virtual domain.
Split patches suggestion
- Branch 1: DB migration file only (schema definition for ce_worklists)
Gherkin scenarios
Feature: Worklist DB table schema
NOTE: TDB