User:Adamw/old/RFC - Campaigns entities

Request for comment (RFC)
RFC - Campaigns entities
Component General
Creation date
Author(s) Adam Roses Wight
Document status incomplete

These improvements to Extension:Campaigns will persist information about campaigns, and provide an API.

Considerations

edit
  • Not sure if we want to have campaign "owners".
  • How to deal with fuzz spam?
  • Do we want any kind of namespacing done on campaigns? Seems wise. This could be done in a semi-transparent way by forming a campaign name like "<group-identifier>/<campaign title>" during campaign creation.

Schema changes

edit

Campaign table

edit
Column Type Description
id unsigned int not null, primary key Autoincrement id
name varchar(255) not null, unique key Campaign name. Cannot be updated.
welcome_title varchar(255) default null Page to show during new account creation.
created_time timestamp not null, key Campaign creation time
is_private tinyint not null default 1 True if campaign membership should be hidden from public view

Campaign owner table

edit
Column Type Description
id unsigned int not null Autoincremented link table row id
campaign_id unsigned int not null FK to campaign.id
user_id unsigned int not null FK to user.user_id

Campaign member table

edit

This table should be designed more carefully so we are future-compatible with obvious, new Campaigns use cases.

Column Type Description
id unsigned int not null Autoincremented link table row id
campaign_id unsigned int not null FK to campaign.id
user_id unsigned int not null FK to user.user_id

Campaign owners

edit

There is currently only one class of campaign owner, and these users are allowed to view all information and make any changes to a campaign.

Interaction with Wikimetrics

edit

Wikimetrics will pull cohorts via an API that we'll create, to let users access them from Wikimetrics.

Wikimetrics will need to be extended to support this new usage.

Future enhancements

edit

Things which need to happen, but are not covered by this RFC:

  • Admin UI: create campaigns, edit properties, assign owners. Allow the community to create social campaigns.
  • Campaign link generation
  • Campaigns for things other than new account creation (e.g. fundraising, editathons)