Index: trunk/extensions/Translate/revtags.sql |
— | — | @@ -1,19 +0,0 @@ |
2 | | - |
3 | | -CREATE TABLE /*$wgDBprefix*/revtag ( |
4 | | - rt_type varbinary(60) not null, |
5 | | - |
6 | | - -- Link to page.page_id |
7 | | - rt_page int not null, |
8 | | - |
9 | | - -- Link to revision.rev_id |
10 | | - rt_revision int not null, |
11 | | - |
12 | | - rt_value blob null |
13 | | -) /*$wgDBTableOptions*/; |
14 | | -CREATE UNIQUE INDEX /*i*/rt_type_page_revision ON /*$wgDBprefix*/revtag |
15 | | -(rt_type, rt_page, rt_revision); |
16 | | -CREATE INDEX /*i*/rt_revision_type ON /*$wgDBprefix*/revtag (rt_revision, rt_type); |
\ No newline at end of file |
Index: trunk/extensions/Translate/translate.sql |
— | — | @@ -1,20 +0,0 @@ |
2 | | - |
3 | | -CREATE TABLE /*_*/translate_sections ( |
4 | | - -- Key to page_id |
5 | | - trs_page int unsigned NOT NULL, |
6 | | - |
7 | | - -- Customizable section name |
8 | | - trs_key varchar(255) binary NOT NULL, |
9 | | - |
10 | | - -- Section contents |
11 | | - trs_text mediumblob NOT NULL, |
12 | | - |
13 | | - -- Section order |
14 | | - trs_order int unsigned, |
15 | | - |
16 | | - PRIMARY KEY (trs_page, trs_key) |
17 | | -) /*$wgDBTableOptions*/; |
18 | | - |
19 | | -CREATE INDEX /*i*/trs_page on /*_*/translate_sections (trs_page); |
Index: trunk/extensions/Translate/translate-add-trs_order.patch.sql |
— | — | @@ -1,2 +0,0 @@ |
2 | | -ALTER TABLE /*_*/translate_sections |
3 | | - ADD trs_order int unsigned; |
\ No newline at end of file |
Index: trunk/extensions/Translate/sql/translate_sections-trs_order.patch.sql |
— | — | @@ -0,0 +1,2 @@ |
| 2 | +ALTER TABLE /*_*/translate_sections |
| 3 | + ADD trs_order int unsigned; |
\ No newline at end of file |
Property changes on: trunk/extensions/Translate/sql/translate_sections-trs_order.patch.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 4 | + native |
Index: trunk/extensions/Translate/sql/translate_sections.sql |
— | — | @@ -0,0 +1,20 @@ |
| 2 | +-- SQL tables for Translate extension |
| 3 | + |
| 4 | +-- List of each section which has a name and text |
| 5 | +CREATE TABLE /*_*/translate_sections ( |
| 6 | + -- Key to page_id |
| 7 | + trs_page int unsigned NOT NULL, |
| 8 | + |
| 9 | + -- Customizable section name |
| 10 | + trs_key varchar(255) binary NOT NULL, |
| 11 | + |
| 12 | + -- Section contents |
| 13 | + trs_text mediumblob NOT NULL, |
| 14 | + |
| 15 | + -- Section order |
| 16 | + trs_order int unsigned, |
| 17 | + |
| 18 | + PRIMARY KEY (trs_page, trs_key) |
| 19 | +) /*$wgDBTableOptions*/; |
| 20 | + |
| 21 | +CREATE INDEX /*i*/trs_page on /*_*/translate_sections (trs_page); |
Property changes on: trunk/extensions/Translate/sql/translate_sections.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 22 | + native |
Index: trunk/extensions/Translate/sql/revtag.sql |
— | — | @@ -0,0 +1,19 @@ |
| 2 | +-- These tables could go into core someday, but not likely |
| 3 | + |
| 4 | +-- Revision tags |
| 5 | +CREATE TABLE /*$wgDBprefix*/revtag ( |
| 6 | + rt_type varbinary(60) not null, |
| 7 | + |
| 8 | + -- Link to page.page_id |
| 9 | + rt_page int not null, |
| 10 | + |
| 11 | + -- Link to revision.rev_id |
| 12 | + rt_revision int not null, |
| 13 | + |
| 14 | + rt_value blob null |
| 15 | +) /*$wgDBTableOptions*/; |
| 16 | +-- Index for finding all revisions in a page with a given tag |
| 17 | +CREATE UNIQUE INDEX /*i*/rt_type_page_revision ON /*$wgDBprefix*/revtag |
| 18 | +(rt_type, rt_page, rt_revision); |
| 19 | +-- Index for finding the tags on a given revision |
| 20 | +CREATE INDEX /*i*/rt_revision_type ON /*$wgDBprefix*/revtag (rt_revision, rt_type); |
\ No newline at end of file |
Property changes on: trunk/extensions/Translate/sql/revtag.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 21 | + native |
Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -385,20 +385,12 @@ |
386 | 386 | return true; |
387 | 387 | } |
388 | 388 | |
389 | | - public static function schemaUpdates( $updater = null ) { |
390 | | - $dir = dirname( __FILE__ ) . '/..'; |
| 389 | + public static function schemaUpdates( $updater ) { |
| 390 | + $dir = dirname( __FILE__ ) . '/../sql'; |
391 | 391 | |
392 | | - if ( $updater === null ) { |
393 | | - global $wgExtNewTables, $wgExtNewFields; |
394 | | - |
395 | | - $wgExtNewTables[] = array( 'translate_sections', "$dir/translate.sql" ); |
396 | | - $wgExtNewFields[] = array( 'translate_sections', 'trs_order', "$dir/translate-add-trs_order.patch.sql" ); |
397 | | - $wgExtNewTables[] = array( 'revtag', "$dir/revtags.sql" ); |
398 | | - } else { |
399 | | - $updater->addExtensionUpdate( array( 'addTable', 'translate_sections', "$dir/translate.sql", true ) ); |
400 | | - $updater->addExtensionUpdate( array( 'addField', 'translate_sections', 'trs_order', "$dir/translate-add-trs_order.patch.sql", true ) ); |
401 | | - $updater->addExtensionUpdate( array( 'addTable', 'revtag', "$dir/revtags.sql", true ) ); |
402 | | - } |
| 392 | + $updater->addExtensionUpdate( array( 'addTable', 'translate_sections', "$dir/translate_sections.sql", true ) ); |
| 393 | + $updater->addExtensionUpdate( array( 'addField', 'translate_sections', 'trs_order', "$dir/translate_sections-trs_order.patch.sql", true ) ); |
| 394 | + $updater->addExtensionUpdate( array( 'addTable', 'revtag', "$dir/revtag.sql", true ) ); |
403 | 395 | return true; |
404 | 396 | } |
405 | 397 | |