|Resolved||santhosh||T95886 for ContentTranslation MT, store information about source content, machine-translated content and user-edited content|
|Resolved||santhosh||T111905 Design the technical infrastructure for parallel corpora storage and api (tracking)|
|Resolved||santhosh||T119617 Create new table for CX Parallel corpora|
|Resolved||None||T120815 Review and create CX Parallel corpora table|
You do not need me to create new tables, that is not a schema change and is not dangerous. See: https://wikitech.wikimedia.org/wiki/Schema_changes#What_is_not_a_schema_change I had already agreed with the table structure.
Jaime has agreed on the table schema and adding a new table is not a schema change. Ie it is not being handled by DBA since it is low risk. Though the wiki page states a table creation on all DB should be notified to dba.
Then how do we create a new table? Almost as you would do on a normal wiki / developer instance. Use MediaWiki maintenance/sql.php to source the .sql patch file that deals with the table creation. The process is documented on wikitech - how to do a schema change:
mwscript sql.php --wiki=testwiki extensions/ContentTranslation/sql/parallel-corpora.sql
Might be tested on the Beta-Cluster-Infrastructure , though there update.php is run continuously. So to do the test you would have to drop the table first or run the sql.php against a wiki database that does not have the table.
Do not ever run update.php on production wiki.
Feel free to poke Release-Engineering-Team about it on IRC #wikimedia-releng or poke regular SWAT deployers which should be familiar with sql.php usage.
The table belongs to the shared wikishared or extension1 (IIRC they have different names in production and beta labs) database, not to the database of any particular wiki. As far as I can see sql.php does not support this.
Indeed MediaWiki maintenance/sql.php relies on a $wgDBName. So instead you can use the mysql client wrapper which connect you directly to any arbitrary database name as an admin. The wrapper grab the user/pass by asking it from MediaWiki PrivateSettings.php
tin$ which sql /usr/local/bin/sql tin$ sql wikishared mysql:wgDBUser@10.0.0.y [wikishared]>
That sql commands is the raw mysql client. It will not expand the MediaWiki magic comments such as /* _ */ or /*$wgDBTableOptions*/. So you will want to double check them and might have to create a suitable .sql file.
Then it should be:
tin$ sql wikishared mysql:wgDBUser@10.0.0.y [wikishared]> source whatever.sql // output of table creation