HomePhabricator

Rewrite DB campaign storage

Description

Rewrite DB campaign storage

This patch throws the old uw_campaigns table out the window and
instead adds the mu_campaign table, with a slightly different schema.
All uses of the old table were removed.

There is now a core-inspired DBAL layer that should keep most of the
DB mess away from application logic. The new classes should allow
for relatively painless removal of the old UploadWizardCampaign
class. Its responsibilities were split into three new classes:

  • CampaignContent for an abstraction over the content of the page the campaign is on.
  • CampaignRecord for representing a DB row for easier and faster retrieval of information related to campaigns.
  • CampaignParsedConfig for parsing and accessing the config.

What is missing for now is a migration script for rebuilding the
table when upgrading from UW, but that will be resolved in T285236

Tested most of the functionality manually, seems to work. Follow-up
commits will do more refactors in the entire codebase.

Bug: T276242
Bug: T283913
Change-Id: Ia77a1f4800e5f588a8576aa16e6a15bad6080c7f

Details

Provenance
OstrzycielAuthored on Jun 20 2021, 2:32 PM
Parents
rEMEU0f77b0c864db: Remove any references to the EventLogging extension
Branches
Unknown
Tags
Unknown
References
refs/changes/44/700444/12
ChangeId
Ia77a1f4800e5f588a8576aa16e6a15bad6080c7f