Index: trunk/extensions/Translate/TranslateHooks.php |
— | — | @@ -186,6 +186,7 @@ |
187 | 187 | $updater->addExtensionUpdate( array( 'dropIndex', 'translate_sections', 'trs_page', "$dir/translate_sections-indexchange2.sql", true ) ); |
188 | 188 | $updater->addExtensionUpdate( array( 'addTable', 'translate_reviews', "$dir/translate_reviews.sql", true ) ); |
189 | 189 | $updater->addExtensionUpdate( array( 'addTable', 'translate_groupreviews', "$dir/translate_groupreviews.sql", true ) ); |
| 190 | + $updater->addExtensionUpdate( array( 'addTable', 'translate_tms', "$dir/translate_tm.sql", true ) ); |
190 | 191 | |
191 | 192 | return true; |
192 | 193 | } |
Index: trunk/extensions/Translate/sql/translate_tm.sql |
— | — | @@ -0,0 +1,38 @@ |
| 2 | +-- Since these tables only store secondary data, |
| 3 | +-- it should be safe to drop them from time to time. |
| 4 | +-- MediaWiki itself guarantees sure that this file is run only once. |
| 5 | + |
| 6 | +-- Source texts |
| 7 | +DROP TABLE IF EXISTS /*_*/translate_tms; |
| 8 | +CREATE TABLE /*_*/translate_tms ( |
| 9 | + tms_sid int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 10 | + -- Language code |
| 11 | + tms_lang varchar(20) binary NOT NULL, |
| 12 | + -- Lenght of the string in characters |
| 13 | + tms_len int unsigned NOT NULL, |
| 14 | + -- The actual text |
| 15 | + tms_text mediumblob NOT NULL, |
| 16 | + -- Identifier where this text came from |
| 17 | + tms_context mediumblob NOT NULL default '' |
| 18 | +) /*$wgDBTableOptions*/; |
| 19 | + |
| 20 | +CREATE INDEX /*i*/tms_lang_len ON /*_*/translate_tms (tms_lang, tms_len); |
| 21 | + |
| 22 | +-- Stored translations |
| 23 | +DROP TABLE IF EXISTS /*_*/translate_tmt; |
| 24 | +CREATE TABLE /*_*/translate_tmt ( |
| 25 | + tmt_sid int unsigned NOT NULL, |
| 26 | + tmt_lang varchar(20) binary NOT NULL, |
| 27 | + tmt_text mediumblob NOT NULL |
| 28 | +) /*$wgDBTableOptions*/; |
| 29 | + |
| 30 | +CREATE UNIQUE INDEX /*i*/tmt_sid_lang ON /*_*/translate_tmt (tmt_sid, tmt_lang); |
| 31 | + |
| 32 | +-- Fulltext search index |
| 33 | +DROP TABLE IF EXISTS /*_*/translate_tmf; |
| 34 | +CREATE TABLE /*_*/translate_tmf ( |
| 35 | + tmf_sid int unsigned NOT NULL, |
| 36 | + tmf_text text |
| 37 | +) ENGINE=MYISAM; |
| 38 | + |
| 39 | +CREATE FULLTEXT INDEX /*i*/tmf_text ON /*_*/translate_tmf (tmf_text); |
Property changes on: trunk/extensions/Translate/sql/translate_tm.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 40 | + native |