Index: trunk/extensions/LiquidThreads/LiquidThreads.php |
— | — | @@ -74,6 +74,9 @@ |
75 | 75 | $wgHooks['ShowSearchHitTitle'][] = 'LqtHooks::customiseSearchResultTitle'; |
76 | 76 | $wgHooks['SpecialSearchProfiles'][] = 'LqtHooks::customiseSearchProfiles'; |
77 | 77 | |
| 78 | +// Updates |
| 79 | +$wgHooks['LoadExtensionSchemaUpdates'][] = 'LqtHooks::onLoadExtensionSchemaUpdates'; |
| 80 | + |
78 | 81 | // Rename |
79 | 82 | $wgHooks['RenameUserSQL'][] = 'LqtHooks::onUserRename'; |
80 | 83 | |
Index: trunk/extensions/LiquidThreads/classes/Hooks.php |
— | — | @@ -287,4 +287,32 @@ |
288 | 288 | |
289 | 289 | return true; |
290 | 290 | } |
| 291 | + |
| 292 | + public static function onLoadExtensionSchemaUpdates() { |
| 293 | + global $wgExtNewTables, $wgExtNewFields, $wgExtPGNewFields, |
| 294 | + $wgExtPGAlteredFields, $wgExtNewIndexes, $wgDBtype; |
| 295 | + |
| 296 | + $dir = dirname( __FILE__ ); |
| 297 | + |
| 298 | + // DB updates |
| 299 | + $wgExtNewTables[] = array( 'thread', "$dir/lqt.sql" ); |
| 300 | + $wgExtNewTables[] = array( 'user_message_state', "$dir/lqt.sql" ); |
| 301 | + $wgExtNewTables[] = array( 'thread_history', "$dir/schema-changes/thread_history_table.sql" ); |
| 302 | + |
| 303 | + |
| 304 | + $wgExtNewFields[] = array( "thread", "thread_article_namespace", "$dir/split-thread_article.sql" ); |
| 305 | + $wgExtNewFields[] = array( "thread", "thread_article_title", "$dir/split-thread_article.sql" ); |
| 306 | + $wgExtNewFields[] = array( "thread", "thread_ancestor", "$dir/normalise-ancestry.sql" ); |
| 307 | + $wgExtNewFields[] = array( "thread", "thread_parent", "$dir/normalise-ancestry.sql" ); |
| 308 | + $wgExtNewFields[] = array( "thread", "thread_modified", "$dir/split-timestamps.sql" ); |
| 309 | + $wgExtNewFields[] = array( "thread", "thread_created", "$dir/split-timestamps.sql" ); |
| 310 | + $wgExtNewFields[] = array( "thread", "thread_editedness", "$dir/store-editedness.sql" ); |
| 311 | + $wgExtNewFields[] = array( "thread", "thread_subject", "$dir/store_subject-author.sql" ); |
| 312 | + $wgExtNewFields[] = array( "thread", "thread_author_id", "$dir/store_subject-author.sql" ); |
| 313 | + $wgExtNewFields[] = array( "thread", "thread_author_name", "$dir/store_subject-author.sql" ); |
| 314 | + |
| 315 | + $wgExtNewIndexes[] = array( 'thread', 'thread_summary_page', '(thread_summary_page)' ); |
| 316 | + |
| 317 | + return true; |
| 318 | + } |
291 | 319 | } |