Page MenuHomePhabricator

addWiki.php create tables it should not
Closed, ResolvedPublic

Description

Comparing it to enwiki, on enwiki there are following tables which are not on nupwiki:

bv2024_edits
cur
flaggedpage_config
flaggedpages
flaggedrevs
flaggedrevs_promote
flaggedrevs_statistics
flaggedrevs_tracking
hidden
ores_classification
ores_model
page_assessments
page_assessments_projects
pagetriage_page
pagetriage_page_tags
pagetriage_tags
securepoll_ucocar2025_edits
wikilove_log
wmcr2024_edits

and the following tables are on nupwiki and not on enwiki:

api_feature_usage
bot_passwords
globalimagelinks
securepoll_log

Ref T371150, T313731.

I dropped api_feature_usage, bot_passwords and globalimagelinks in nupwiki. Someone in TSP says securepoll_log should actually exists and it's weird it's not in enwiki.

Event Timeline

The list of the tables that exists where they shouldn't, a lot of them are because of this bug:

1table exists where it should not: flaggedpage_config frwiki
2table exists where it should not: flaggedpages frwiki
3table exists where it should not: flaggedrevs frwiki
4table exists where it should not: flaggedrevs_promote frwiki
5table exists where it should not: flaggedrevs_statistics frwiki
6table exists where it should not: flaggedrevs_tracking frwiki
7table exists where it should not: thread labswiki
8table exists where it should not: thread_history labswiki
9table exists where it should not: thread_pending_relationship labswiki
10table exists where it should not: thread_reaction labswiki
11table exists where it should not: user_message_state labswiki
12table exists where it should not: cn_assignments idwikivoyage
13table exists where it should not: cn_known_devices idwikivoyage
14table exists where it should not: cn_known_mobile_carriers idwikivoyage
15table exists where it should not: cn_notice_countries idwikivoyage
16table exists where it should not: cn_notice_languages idwikivoyage
17table exists where it should not: cn_notice_log idwikivoyage
18table exists where it should not: cn_notice_mixin_params idwikivoyage
19table exists where it should not: cn_notice_mixins idwikivoyage
20table exists where it should not: cn_notice_mobile_carriers idwikivoyage
21table exists where it should not: cn_notice_regions idwikivoyage
22table exists where it should not: cn_notices idwikivoyage
23table exists where it should not: cn_template_devices idwikivoyage
24table exists where it should not: cn_template_log idwikivoyage
25table exists where it should not: cn_template_mixins idwikivoyage
26table exists where it should not: cn_templates idwikivoyage
27table exists where it should not: globalimagelinks idwikivoyage
28table exists where it should not: cn_assignments kncwiki
29table exists where it should not: cn_known_devices kncwiki
30table exists where it should not: cn_known_mobile_carriers kncwiki
31table exists where it should not: cn_notice_countries kncwiki
32table exists where it should not: cn_notice_languages kncwiki
33table exists where it should not: cn_notice_log kncwiki
34table exists where it should not: cn_notice_mixin_params kncwiki
35table exists where it should not: cn_notice_mixins kncwiki
36table exists where it should not: cn_notice_mobile_carriers kncwiki
37table exists where it should not: cn_notice_regions kncwiki
38table exists where it should not: cn_notices kncwiki
39table exists where it should not: cn_template_devices kncwiki
40table exists where it should not: cn_template_log kncwiki
41table exists where it should not: cn_template_mixins kncwiki
42table exists where it should not: cn_templates kncwiki
43table exists where it should not: globalimagelinks kncwiki
44table exists where it should not: cn_assignments satwiktionary
45table exists where it should not: cn_known_devices satwiktionary
46table exists where it should not: cn_known_mobile_carriers satwiktionary
47table exists where it should not: cn_notice_countries satwiktionary
48table exists where it should not: cn_notice_languages satwiktionary
49table exists where it should not: cn_notice_log satwiktionary
50table exists where it should not: cn_notice_mixin_params satwiktionary
51table exists where it should not: cn_notice_mixins satwiktionary
52table exists where it should not: cn_notice_mobile_carriers satwiktionary
53table exists where it should not: cn_notice_regions satwiktionary
54table exists where it should not: cn_notices satwiktionary
55table exists where it should not: cn_template_devices satwiktionary
56table exists where it should not: cn_template_log satwiktionary
57table exists where it should not: cn_template_mixins satwiktionary
58table exists where it should not: cn_templates satwiktionary
59table exists where it should not: globalimagelinks satwiktionary
60table exists where it should not: cn_assignments sylwiki
61table exists where it should not: cn_known_devices sylwiki
62table exists where it should not: cn_known_mobile_carriers sylwiki
63table exists where it should not: cn_notice_countries sylwiki
64table exists where it should not: cn_notice_languages sylwiki
65table exists where it should not: cn_notice_log sylwiki
66table exists where it should not: cn_notice_mixin_params sylwiki
67table exists where it should not: cn_notice_mixins sylwiki
68table exists where it should not: cn_notice_mobile_carriers sylwiki
69table exists where it should not: cn_notice_regions sylwiki
70table exists where it should not: cn_notices sylwiki
71table exists where it should not: cn_template_devices sylwiki
72table exists where it should not: cn_template_log sylwiki
73table exists where it should not: cn_template_mixins sylwiki
74table exists where it should not: cn_templates sylwiki
75table exists where it should not: globalimagelinks sylwiki
76table exists where it should not: cn_assignments tigwiki
77table exists where it should not: cn_known_devices tigwiki
78table exists where it should not: cn_known_mobile_carriers tigwiki
79table exists where it should not: cn_notice_countries tigwiki
80table exists where it should not: cn_notice_languages tigwiki
81table exists where it should not: cn_notice_log tigwiki
82table exists where it should not: cn_notice_mixin_params tigwiki
83table exists where it should not: cn_notice_mixins tigwiki
84table exists where it should not: cn_notice_mobile_carriers tigwiki
85table exists where it should not: cn_notice_regions tigwiki
86table exists where it should not: cn_notices tigwiki
87table exists where it should not: cn_template_devices tigwiki
88table exists where it should not: cn_template_log tigwiki
89table exists where it should not: cn_template_mixins tigwiki
90table exists where it should not: cn_templates tigwiki
91table exists where it should not: globalimagelinks tigwiki
92table exists where it should not: revsrc aswikisource
93table exists where it should not: srcwork aswikisource
94table exists where it should not: swsite aswikisource
95table exists where it should not: flaggedpage_config bawiki
96table exists where it should not: flaggedpages bawiki
97table exists where it should not: flaggedrevs bawiki
98table exists where it should not: flaggedrevs_promote bawiki
99table exists where it should not: flaggedrevs_statistics bawiki
100table exists where it should not: flaggedrevs_tracking bawiki
101table exists where it should not: pr_index frrwiki
102table exists where it should not: wikilove_log hiwikisource
103table exists where it should not: oauth2_access_tokens mediawikiwiki
104table exists where it should not: oauth_accepted_consumer mediawikiwiki
105table exists where it should not: oauth_registered_consumer mediawikiwiki
106table exists where it should not: revtag officewiki
107table exists where it should not: translate_cache officewiki
108table exists where it should not: translate_groupreviews officewiki
109table exists where it should not: translate_groupstats officewiki
110table exists where it should not: translate_message_group_subscriptions officewiki
111table exists where it should not: translate_messageindex officewiki
112table exists where it should not: translate_metadata officewiki
113table exists where it should not: translate_reviews officewiki
114table exists where it should not: translate_sections officewiki
115table exists where it should not: translate_translatable_bundles officewiki
116table exists where it should not: flaggedpage_config siwiki
117table exists where it should not: flaggedpages siwiki
118table exists where it should not: flaggedrevs siwiki
119table exists where it should not: flaggedrevs_promote siwiki
120table exists where it should not: flaggedrevs_statistics siwiki
121table exists where it should not: flaggedrevs_tracking siwiki
122table exists where it should not: pr_index sourceswiki
123table exists where it should not: pr_index test2wiki
124table exists where it should not: wikifunctionsclient_usage test2wiki
125table exists where it should not: thread wikimania2011wiki
126table exists where it should not: thread_history wikimania2011wiki
127table exists where it should not: user_message_state wikimania2011wiki

Of those, the only ones related to addWiki are:

table exists where it should not: cn_assignments idwikivoyage
table exists where it should not: cn_known_devices idwikivoyage
table exists where it should not: cn_known_mobile_carriers idwikivoyage
table exists where it should not: cn_notice_countries idwikivoyage
table exists where it should not: cn_notice_languages idwikivoyage
table exists where it should not: cn_notice_log idwikivoyage
table exists where it should not: cn_notice_mixin_params idwikivoyage
table exists where it should not: cn_notice_mixins idwikivoyage
table exists where it should not: cn_notice_mobile_carriers idwikivoyage
table exists where it should not: cn_notice_regions idwikivoyage
table exists where it should not: cn_notices idwikivoyage
table exists where it should not: cn_template_devices idwikivoyage
table exists where it should not: cn_template_log idwikivoyage
table exists where it should not: cn_template_mixins idwikivoyage
table exists where it should not: cn_templates idwikivoyage
table exists where it should not: cn_assignments kncwiki
table exists where it should not: cn_known_devices kncwiki
table exists where it should not: cn_known_mobile_carriers kncwiki
table exists where it should not: cn_notice_countries kncwiki
table exists where it should not: cn_notice_languages kncwiki
table exists where it should not: cn_notice_log kncwiki
table exists where it should not: cn_notice_mixin_params kncwiki
table exists where it should not: cn_notice_mixins kncwiki
table exists where it should not: cn_notice_mobile_carriers kncwiki
table exists where it should not: cn_notice_regions kncwiki
table exists where it should not: cn_notices kncwiki
table exists where it should not: cn_template_devices kncwiki
table exists where it should not: cn_template_log kncwiki
table exists where it should not: cn_template_mixins kncwiki
table exists where it should not: cn_templates kncwiki
table exists where it should not: cn_assignments satwiktionary
table exists where it should not: cn_known_devices satwiktionary
table exists where it should not: cn_known_mobile_carriers satwiktionary
table exists where it should not: cn_notice_countries satwiktionary
table exists where it should not: cn_notice_languages satwiktionary
table exists where it should not: cn_notice_log satwiktionary
table exists where it should not: cn_notice_mixin_params satwiktionary
table exists where it should not: cn_notice_mixins satwiktionary
table exists where it should not: cn_notice_mobile_carriers satwiktionary
table exists where it should not: cn_notice_regions satwiktionary
table exists where it should not: cn_notices satwiktionary
table exists where it should not: cn_template_devices satwiktionary
table exists where it should not: cn_template_log satwiktionary
table exists where it should not: cn_template_mixins satwiktionary
table exists where it should not: cn_templates satwiktionary
table exists where it should not: cn_assignments sylwiki
table exists where it should not: cn_known_devices sylwiki
table exists where it should not: cn_known_mobile_carriers sylwiki
table exists where it should not: cn_notice_countries sylwiki
table exists where it should not: cn_notice_languages sylwiki
table exists where it should not: cn_notice_log sylwiki
table exists where it should not: cn_notice_mixin_params sylwiki
table exists where it should not: cn_notice_mixins sylwiki
table exists where it should not: cn_notice_mobile_carriers sylwiki
table exists where it should not: cn_notice_regions sylwiki
table exists where it should not: cn_notices sylwiki
table exists where it should not: cn_template_devices sylwiki
table exists where it should not: cn_template_log sylwiki
table exists where it should not: cn_template_mixins sylwiki
table exists where it should not: cn_templates sylwiki
table exists where it should not: cn_assignments tigwiki
table exists where it should not: cn_known_devices tigwiki
table exists where it should not: cn_known_mobile_carriers tigwiki
table exists where it should not: cn_notice_countries tigwiki
table exists where it should not: cn_notice_languages tigwiki
table exists where it should not: cn_notice_log tigwiki
table exists where it should not: cn_notice_mixin_params tigwiki
table exists where it should not: cn_notice_mixins tigwiki
table exists where it should not: cn_notice_mobile_carriers tigwiki
table exists where it should not: cn_notice_regions tigwiki
table exists where it should not: cn_notices tigwiki
table exists where it should not: cn_template_devices tigwiki
table exists where it should not: cn_template_log tigwiki
table exists where it should not: cn_template_mixins tigwiki
table exists where it should not: cn_templates tigwiki

Probably fixed by T389348 which happened after these wikis were created

table exists where it should not: globalimagelinks idwikivoyage
table exists where it should not: globalimagelinks kncwiki
table exists where it should not: globalimagelinks sylwiki
table exists where it should not: globalimagelinks tigwiki

Still to do.

Not sure what happened with api_feature_usage or bot_passwords ...

  1. The code for ApiFeatureUsage is correct, but as long as T371150 did not happen, it thinks the table should be locally.
  2. T400169 fixed globalimagelinks.
  3. bot_passwords is currently just created together with all other local tables in one go ignoring any virtual domain.

Change #1176202 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/core@master] Create bot_passwords table on virtual domain

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

Change #1176228 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/ApiFeatureUsage@master] Do not create a database table when a different provider is used

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

Change #1176202 abandoned by Zabe:

[mediawiki/core@master] Create bot_passwords table on virtual domain

Reason:

no

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

Zabe claimed this task.

bot_passwords is the only one left, but Amir said it is fine.

Change #1176228 merged by jenkins-bot:

[mediawiki/extensions/ApiFeatureUsage@master] Do not create a database table when a different provider is used

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

Change #1176250 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/ApiFeatureUsage@wmf/1.45.0-wmf.12] Do not create a database table when a different provider is used

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

Change #1176251 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/ApiFeatureUsage@wmf/1.45.0-wmf.13] Do not create a database table when a different provider is used

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

Change #1176250 merged by jenkins-bot:

[mediawiki/extensions/ApiFeatureUsage@wmf/1.45.0-wmf.12] Do not create a database table when a different provider is used

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

Change #1176251 merged by jenkins-bot:

[mediawiki/extensions/ApiFeatureUsage@wmf/1.45.0-wmf.13] Do not create a database table when a different provider is used

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

Mentioned in SAL (#wikimedia-operations) [2025-08-07T14:16:14Z] <zabe@deploy1003> Started scap sync-world: Backport for [[gerrit:1176251|Do not create a database table when a different provider is used (T397348)]], [[gerrit:1176250|Do not create a database table when a different provider is used (T397348)]]

Mentioned in SAL (#wikimedia-operations) [2025-08-07T14:18:08Z] <zabe@deploy1003> zabe: Backport for [[gerrit:1176251|Do not create a database table when a different provider is used (T397348)]], [[gerrit:1176250|Do not create a database table when a different provider is used (T397348)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-08-07T14:24:08Z] <zabe@deploy1003> Finished scap sync-world: Backport for [[gerrit:1176251|Do not create a database table when a different provider is used (T397348)]], [[gerrit:1176250|Do not create a database table when a different provider is used (T397348)]] (duration: 07m 54s)