Index: branches/RL2/extensions/Gadgets/sql/gadgets.sql |
— | — | @@ -0,0 +1,9 @@ |
| 2 | +-- Add gadgets table |
| 3 | + |
| 4 | +CREATE TABLE /*_*/gadgets ( |
| 5 | + gd_name varchar(255) binary NOT NULL PRIMARY KEY, |
| 6 | + gd_blob mediumblob NOT NULL, |
| 7 | + gd_global bool NOT NULL |
| 8 | +) /*$wgDBTableOptions*/; |
| 9 | + |
| 10 | +CREATE INDEX /*i*/gd_global_name ON /*_*/gadgets (gd_global, gd_name); |
Property changes on: branches/RL2/extensions/Gadgets/sql/gadgets.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 11 | + native |
Index: branches/RL2/extensions/Gadgets/Gadgets_body.php |
— | — | @@ -181,6 +181,12 @@ |
182 | 182 | $files[] = dirname( __FILE__ ) . '/Gadgets_tests.php'; |
183 | 183 | return true; |
184 | 184 | } |
| 185 | + |
| 186 | + public static function loadExtensionSchemaUpdates( $updater ) { |
| 187 | + $dir = dirname( __FILE__ ); |
| 188 | + $updater->addExtensionUpdate( array( 'addtable', 'gadgets', "$dir/sql/gadgets.sql", true ) ); |
| 189 | + return true; |
| 190 | + } |
185 | 191 | } |
186 | 192 | |
187 | 193 | /** |
Index: branches/RL2/extensions/Gadgets/Gadgets.php |
— | — | @@ -32,6 +32,7 @@ |
33 | 33 | $wgHooks['ArticleSaveComplete'][] = 'GadgetHooks::articleSaveComplete'; |
34 | 34 | $wgHooks['BeforePageDisplay'][] = 'GadgetHooks::beforePageDisplay'; |
35 | 35 | $wgHooks['GetPreferences'][] = 'GadgetHooks::getPreferences'; |
| 36 | +$wgHooks['LoadExtensionSchemaUpdates'][] = 'GadgetHooks::loadExtensionSchemaUpdates'; |
36 | 37 | $wgHooks['ResourceLoaderRegisterModules'][] = 'GadgetHooks::registerModules'; |
37 | 38 | $wgHooks['UnitTestsList'][] = 'GadgetHooks::unitTestsList'; |
38 | 39 | |