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

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 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