Page MenuHomePhabricator

drop_content_model_info.sql seems to be orphaned
Closed, ResolvedPublic

Description

In rMW906a1ba51f14: [bug 37746] string ids for content model and format. maintenance/storage/drop_content_model_info.sql was added

Contents

ALTER TABLE /*$wgDBprefix*/archive  DROP COLUMN ar_content_model;
ALTER TABLE /*$wgDBprefix*/archive  DROP COLUMN ar_content_format;

ALTER TABLE /*$wgDBprefix*/revision  DROP COLUMN rev_content_model;
ALTER TABLE /*$wgDBprefix*/revision  DROP COLUMN rev_content_format;

ALTER TABLE /*$wgDBprefix*/page  DROP COLUMN page_content_model;

It seems to be orphaned in that commit, and not used (obviously anywhere else).

Can we remove the file?

Event Timeline

Reedy created this task.Aug 23 2020, 12:55 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 23 2020, 12:55 AM
Reedy updated the task description. (Show Details)Aug 23 2020, 12:59 AM
Reedy added a comment.Aug 23 2020, 1:06 AM

Ah, it's mentioned in rEWBA508f8b7dab9a: Use 'wikibase-item' as content model id....

But that's hardly usefully referenced...

Change 621930 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/core@master] Remove maintenance/storage/drop_content_model_info.sql

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

This requires not only code review, but also investigating if this file is still needed. It seems like these columns should still be dropped, but they might be getting dropped elsewhere.

This requires not only code review, but also investigating if this file is still needed. It seems like these columns should still be dropped, but they might be getting dropped elsewhere.

They are not all being dropped elsewhere.

drop_content_model_info.sql
ALTER TABLE /*$wgDBprefix*/archive  DROP COLUMN ar_content_model;
ALTER TABLE /*$wgDBprefix*/archive  DROP COLUMN ar_content_format;

ALTER TABLE /*$wgDBprefix*/revision  DROP COLUMN rev_content_model;
ALTER TABLE /*$wgDBprefix*/revision  DROP COLUMN rev_content_format;

ALTER TABLE /*$wgDBprefix*/page  DROP COLUMN page_content_model;

is mostly covered in T184615: Once MCR is deployed, drop the rev_text_id, rev_content_model, and rev_content_format fields from the revision table

patch-archive-MCR.sql
ALTER TABLE /*_*/archive
	...
	DROP COLUMN ar_content_model,
	DROP COLUMN ar_content_format;
patch-revision-actor-comment-MCR.sql
ALTER TABLE /*_*/revision
	...
	DROP COLUMN rev_content_model,
	DROP COLUMN rev_content_format,
	...

But page_content_model still exists. See T230607: stop using page_content_model

Change 621930 merged by jenkins-bot:
[mediawiki/core@master] Remove maintenance/storage/drop_content_model_info.sql

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

Reedy closed this task as Resolved.Sep 3 2020, 9:20 PM
Reedy claimed this task.

Change 624286 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/core@REL1_35] Remove maintenance/storage/drop_content_model_info.sql

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

Change 624286 merged by jenkins-bot:
[mediawiki/core@REL1_35] Remove maintenance/storage/drop_content_model_info.sql

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