(Go: >> BACK << -|- >> HOME <<)

Page MenuHomePhabricator

Update the DB schema with the fields required for the "participant questions" feature
Closed, ResolvedPublic

Description

From T328032#8936008 (with small tweaks):

The current schema should be updated:

  • We should store the time of first answer, probably in the ce_participants table
  • We may have to store whether your answers have already been aggregated (e.g., to prevent you from answering again), if this can't be inferred from the other data.

Update 2023-06-27: we decided that we're going to store whether answers were already aggregated regardless of the fact that this information can be derived from other things. We're doing this for simplicity, and because space isn't a concern. Also, we will store it as a timestamp (instead of a boolean) in case we need it later.

Acceptance criteria

  • A new column is added to ce_participants to store the timestamp (or null) when the participant answered the questions for the first time
  • A new column is added to ce_participants to store the timestamp (or null) when the participant's answers were aggregated
  • The new columns should be created in beta
  • The new columns should be created in production

Event Timeline

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

[mediawiki/extensions/CampaignEvents@master] Add columns to ce_participants for participant questions

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

Change 933622 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add columns to ce_participants for participant questions

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

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

[mediawiki/extensions/CampaignEvents@master] Remove the cep_aggregation DB index

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

Change 934376 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Remove the cep_aggregation DB index

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

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

[mediawiki/extensions/CampaignEvents@master] Add new columns for participant questions to the code

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

Change 935100 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add new columns for participant questions to the code

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