Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/182104
Change subject: Cleanup SLQ whitespace and comments ...................................................................... Cleanup SLQ whitespace and comments Change-Id: I6f713744cf11afb2550c05483f83b61e960a97f1 --- M sql/contenttranslation.sql 1 file changed, 47 insertions(+), 41 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/04/182104/1 diff --git a/sql/contenttranslation.sql b/sql/contenttranslation.sql index 2c1d4a9..b1975cf 100644 --- a/sql/contenttranslation.sql +++ b/sql/contenttranslation.sql @@ -1,4 +1,4 @@ --- Some example steps for creating a new database for testing this: +-- Example steps for creating a new database for testing this: -- mysql> CREATE DATABASE contenttranslation; -- mysql> USE contenttranslation; -- In the next line replace "USER" with the value of $wgDBuser from your LocalSettings.php, @@ -8,54 +8,60 @@ DROP TABLE IF EXISTS /*_*/cx_translations; CREATE TABLE /*_*/cx_translations ( - -- translation id. Autogenerated. - translation_id int primary key auto_increment, - -- Source title of the translation - translation_source_title varbinary(512) not null, - -- Target title of the translation - translation_target_title varbinary(512) not null, - -- Source language. language code - translation_source_language varbinary(36) not null, - -- Target language. language code - translation_target_language varbinary(36) not null, - -- source of the page as full canonical url -- https://www.mediawiki.org/wiki/Help:CxIsPage - translation_source_url text binary not null, - -- link to the draft/published target - translation_target_url text binary not null, - -- Status of translation - Draft or published status. - -- There is no final status. A published translation can be draft again to update again - translation_status enum('draft', 'published' ) default null, - -- Start date of this translation - translation_start_timestamp varchar(14) binary not null, - -- Last updated date of this translation - translation_last_updated_timestamp varchar(14) binary not null, - -- Progress of the translation - json dump - translation_progress TINYBLOB not null, - -- Who started this translation? User id - translation_started_by int, - -- Who did the last translation? It need not be the translator who started. - translation_last_update_by int + -- translation id. Autogenerated. + translation_id int primary key auto_increment, + -- Source title of the translation + translation_source_title varbinary(512) not null, + -- Target title of the translation + translation_target_title varbinary(512) not null, + -- Source language. language code + translation_source_language varbinary(36) not null, + -- Target language. language code + translation_target_language varbinary(36) not null, + -- source of the page as full canonical url -- https://www.mediawiki.org/wiki/Help:CxIsPage + translation_source_url text binary not null, + -- link to the draft/published target + translation_target_url text binary not null, + -- Status of translation - Draft or published status. + -- There is no final status. A published translation can be draft again to update again + translation_status enum('draft', 'published') default null, + -- Start date of this translation + translation_start_timestamp varchar(14) binary not null, + -- Last updated date of this translation + translation_last_updated_timestamp varchar(14) binary not null, + -- Progress of the translation - json dump + translation_progress TINYBLOB not null, + -- Who started this translation? User id + translation_started_by int, + -- Who did the last translation? It need not be the translator who started. + translation_last_update_by int ) /*$wgDBTableOptions*/; DROP TABLE IF EXISTS /*_*/cx_translators; CREATE TABLE /*_*/cx_translators ( - -- Translators id - global user id - translator_user_id int not null, - -- Translation id - foreign key to translations.translation_id - translator_translation_id int not null + -- Translators id - global user id + translator_user_id int not null, + -- Translation id - foreign key to translations.translation_id + translator_translation_id int not null ) /*$wgDBTableOptions*/; DROP TABLE IF EXISTS /*_*/cx_drafts; CREATE TABLE /*_*/cx_drafts ( - -- Draft Id - foreign key to cx_translations.translation_id - draft_id int primary key not null, - -- Draft save timestamp - draft_timestamp varchar(14) binary not null, - -- Translation draft content - draft_content mediumblob + -- Draft Id - foreign key to cx_translations.translation_id + draft_id int primary key not null, + -- Draft save timestamp + draft_timestamp varchar(14) binary not null, + -- Translation draft content + draft_content mediumblob ) /*$wgDBTableOptions*/; +CREATE UNIQUE INDEX /*i*/cx_translation_pair ON /*_*/cx_translations ( + translation_source_title, + translation_source_language, + translation_target_language +); -CREATE UNIQUE INDEX /*i*/cx_translation_pair ON /*_*/cx_translations ( translation_source_title, translation_source_language, translation_target_language ); - -CREATE UNIQUE INDEX /*i*/cx_translation_translators ON /*_*/cx_translators ( translator_user_id, translator_translation_id ); +CREATE UNIQUE INDEX /*i*/cx_translation_translators ON /*_*/cx_translators ( + translator_user_id, + translator_translation_id +); -- To view, visit https://gerrit.wikimedia.org/r/182104 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6f713744cf11afb2550c05483f83b61e960a97f1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits