Page MenuHomePhabricator

Create combined sql file for Translate
Closed, ResolvedPublic

Description

Is it possible for Translate to have one combined sql file for new installs?

With 13 files, it's quite annoying/confusing when setting it up on new (WMF) wikis as we can't use update.php


Version: unspecified
Severity: enhancement

Details

Reference
bz44352

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:40 AM
bzimport set Reference to bz44352.
bzimport added a subscriber: Unknown Object (MLST).

I apparently still missed one:

A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script
Query: SELECT tmi_value FROM translate_messageindex WHERE tmi_key = '-1:version' LIMIT 1
Function: DatabaseMessageIndex::get
Error: 1146 Table 'brwikimedia.translate_messageindex' doesn't exist (10.64.0.7)

Only 7 files are relevant for WMF, which would be the only user of this combined file.

revtag.sql
translate_groupstats.sql
translate_metadata.sql
translate_sections.sql
translate_groupreviews.sql
translate_messageindex.sql
translate_reviews.sql

Separate file can easily get out of date.

(In reply to comment #2)

Only 7 files are relevant for WMF, which would be the only user of this
combined file.

revtag.sql
translate_groupstats.sql
translate_metadata.sql
translate_sections.sql
translate_groupreviews.sql
translate_messageindex.sql
translate_reviews.sql

Separate file can easily get out of date.

Maybe, but if you edit one, you edit both..

And you could use that as the default/first file in schema updates

Other than that, it might be worth creating a small script in WikimediaMaintenance (Probably better than translate itself?) to create all the tables on a specific wiki when provided with a dbname?

Could just be done in bash with mwscript, or as a more "proper" MediaWiki maintenance script