Page MenuHomePhabricator

🟢 API: Add a WikiSiteInfo model to the database and add a one to one field for the top level Wiki class, introduce `featured`and `description` fields
Closed, ResolvedPublic

Description

Parent ticket https://phabricator.wikimedia.org/T339334#9092727

In order to be able to store per-wiki statistics, introduce a WikiSiteInfo Eloquent model and add such info to the Wiki model, using a one to one relationship.

The fields of the WikiSiteInfo model should match the info returned from a siteinfo MediaWiki API call (when a field is not present it gets zeroed out):

"pages": int,
"articles": int,
"edits": int,
"images": int,
"users": int,
"activeusers": int,
"admins": int,
"jobs": int,
"cirrussearch-article-words": int

Also. a boolean field isFeatured is introduced at Wiki level.

Also. a text field description is introduced at Wiki level.

AC:

  • The new WikiSiteInfo model is created and attached to the Wiki model
  • The new isFeatured property is created on the Wiki model, defaulting to false
  • The new description property is created on the Wiki model, defaulting to the empty string
  • Migrations are created
  • Applying the migration created all-zero data for each wiki

Event Timeline

Fring renamed this task from API: Add a WikiStats model to the database and add a one to one field for the top level Wiki class to API: Add a WikiSiteInfo model to the database and add a one to one field for the top level Wiki class, introduce `featured` field.Aug 21 2023, 7:35 AM
Fring updated the task description. (Show Details)
Fring renamed this task from API: Add a WikiSiteInfo model to the database and add a one to one field for the top level Wiki class, introduce `featured` field to API: Add a WikiSiteInfo model to the database and add a one to one field for the top level Wiki class, introduce `featured`and `description` fields.Aug 21 2023, 7:38 AM
Fring updated the task description. (Show Details)
Deniz_WMDE renamed this task from API: Add a WikiSiteInfo model to the database and add a one to one field for the top level Wiki class, introduce `featured`and `description` fields to 🟢 API: Add a WikiSiteInfo model to the database and add a one to one field for the top level Wiki class, introduce `featured`and `description` fields.Aug 21 2023, 9:11 AM
Fring removed Fring as the assignee of this task.Aug 21 2023, 2:11 PM
Evelien_WMDE claimed this task.