/** * @param DatabaseUpdater $updater * @return bool */ public static function addSchemaUpdates(DatabaseUpdater $updater) { $base = dirname(__FILE__); if ($updater->getDB()->getType() == 'mysql') { $base = "{$base}/mysql"; $updater->addExtensionTable('account_requests', "{$base}/ConfirmAccount.sql", true); $updater->addExtensionField('account_requests', 'acr_filename', "{$base}/patch-acr_filename.sql"); $updater->addExtensionTable('addTable', 'account_credentials', "{$base}/patch-account_credentials.sql", true); $updater->addExtensionField('account_requests', 'acr_areas', "{$base}/patch-acr_areas.sql", true); $updater->addExtensionIndex('account_requests', 'acr_email', "{$base}/patch-email-index.sql", true); } elseif ($updater->getDB()->getType() == 'postgres') { $base = "{$base}/postgres"; $updater->addExtensionUpdate(array('addTable', 'account_requests', "{$base}/ConfirmAccount.pg.sql", true)); $updater->addExtensionUpdate(array('addPgField', 'account_requests', 'acr_held', "TIMESTAMPTZ")); $updater->addExtensionUpdate(array('addPgField', 'account_requests', 'acr_filename', "TEXT")); $updater->addExtensionUpdate(array('addPgField', 'account_requests', 'acr_storage_key', "TEXT")); $updater->addExtensionUpdate(array('addPgField', 'account_requests', 'acr_comment', "TEXT NOT NULL DEFAULT ''")); $updater->addExtensionUpdate(array('addPgField', 'account_requests', 'acr_type', "INTEGER NOT NULL DEFAULT 0")); $updater->addExtensionUpdate(array('addTable', 'account_credentials', "{$base}/patch-account_credentials.sql", true)); $updater->addExtensionUpdate(array('addPgField', 'account_requests', 'acr_areas', "TEXT")); $updater->addExtensionUpdate(array('addPgField', 'account_credentials', 'acd_areas', "TEXT")); $updater->addExtensionUpdate(array('addIndex', 'account_requests', 'acr_email', "{$base}/patch-email-index.sql", true)); } return true; }
/** * Schema update to set up the needed database tables. * * @since 0.1 * * @param DatabaseUpdater $updater * * @return true */ public static function onSchemaUpdate(DatabaseUpdater $updater) { global $wgDBtype; $updater->addExtensionUpdate(array('addTable', 'surveys', dirname(__FILE__) . '/sql/Survey.sql', true)); $updater->addExtensionUpdate(array('addIndex', 'surveys', 'surveys_survey_title', dirname(__FILE__) . '/sql/AddMissingIndexes.sql', true)); return true; }
/** * Schema update to set up the needed database tables. * @see https://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates * * @since 0.1 * * @param DatabaseUpdater $updater * * @return true */ public static function onSchemaUpdate(DatabaseUpdater $updater) { $updater->addExtensionUpdate(array('addTable', 'contests', dirname(__FILE__) . '/Contest.sql', true)); $updater->addExtensionUpdate(array('addField', 'contests', 'contest_signup_email', dirname(__FILE__) . '/sql/AddContestEmailFields.sql', true)); $updater->addExtensionUpdate(array('applyPatch', dirname(__FILE__) . '/sql/UpdateContestantRatingField.sql', true)); return true; }
public static function onLoadExtensionSchemaUpdates(DatabaseUpdater $updater = null) { $dbDir = __DIR__ . '/db'; $updater->addExtensionUpdate(array('addtable', 'page_assessments', "{$dbDir}/addReviewsTable.sql", true)); $updater->addExtensionUpdate(array('addtable', 'page_assessments_log', "{$dbDir}/addLoggingTable.sql", true)); return true; }
/** * Schema update to set up the needed database tables. * * @since 1.2 * * @param DatabaseUpdater $updater * * @return true */ public static function onSchemaUpdate($updater = null) { $updater->addExtensionTable('uw_campaigns', dirname(__FILE__) . '/UploadWizard.sql'); $updater->addExtensionUpdate(array('addIndex', 'uw_campaigns', 'uw_campaigns_name', dirname(__FILE__) . '/sql/UW_IndexCampaignsName.sql', true)); $updater->addExtensionUpdate(array('addIndex', 'uw_campaign_conf', 'uw_cc_id_property', dirname(__FILE__) . '/sql/UW_IndexConfIdProp.sql', true)); $updater->addExtensionUpdate(array('addIndex', 'uw_campaign_conf', 'uw_cc_property', dirname(__FILE__) . '/sql/UW_IndexConfProp.sql', true)); return true; }
/** * Schema update to set up the needed database tables. * @see https://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates * * @since 0.1 * * @param DatabaseUpdater $updater * * @return true */ public static function onSchemaUpdate(DatabaseUpdater $updater) { $updater->addExtensionTable('ep_orgs', dirname(__FILE__) . '/sql/EducationProgram.sql'); $updater->addExtensionUpdate(array('addTable', 'ep_oas_per_course', dirname(__FILE__) . '/sql/AddAmbassadorLinks.sql', true)); $updater->addExtensionUpdate(array('addField', 'ep_oas_per_course', 'opc_user_id', dirname(__FILE__) . '/sql/RenameAmbUserField.sql', true)); $updater->addExtensionUpdate(array('addField', 'ep_revisions', 'rev_object_identifier', dirname(__FILE__) . '/sql/AddRevIdentifier.sql', true)); return true; }
/** * Schema update to set up the needed database tables. * @see https://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates * * @since 0.1 * * @param DatabaseUpdater $updater * * @return true */ public static function onSchemaUpdate(DatabaseUpdater $updater) { $updater->addExtensionTable('ep_orgs', dirname(__FILE__) . '/sql/EducationProgram.sql'); $updater->addExtensionUpdate(array('addField', 'ep_orgs', 'org_courses', dirname(__FILE__) . '/sql/AddExtraFields.sql', true)); $updater->addExtensionUpdate(array('addField', 'ep_orgs', 'org_active', dirname(__FILE__) . '/sql/AddStatusFields.sql', true)); $updater->addExtensionUpdate(array('addField', 'ep_courses', 'course_instructors', dirname(__FILE__) . '/sql/AddMentorFields.sql', true)); $updater->addExtensionUpdate(array('addField', 'ep_terms', 'term_students', dirname(__FILE__) . '/sql/AddStudentsField.sql', true)); return true; }
public static function describeDBSchema(DatabaseUpdater $updater = null) { $dir = __DIR__ . '/sql'; // For now, there's just a single SQL file for all DB types. $updater->addExtensionUpdate(array('addTable', 'approved_pages', "{$dir}/ApprovedRevs.sql", true)); $updater->addExtensionUpdate(array('modifyField', 'approved_pages', 'ap_user_group', "{$dir}/patch-ap_group-length-increase-255.sql", true)); $updater->addExtensionUpdate(array('addIndex', 'approved_pages', 'approved_pages_page_id', "{$dir}/patch-add-indices.sql", true)); return true; }
/** * Schema update to set up the needed database tables. * * @since 1.2 * * @param DatabaseUpdater $updater * * @return true */ public static function onSchemaUpdate($updater = null) { $dbfile = dirname(__FILE__) . '/UploadWizard.' . $updater->getDB()->getType() . '.sql'; if (!file_exists($dbfile)) { $dbfile = dirname(__FILE__) . '/UploadWizard.sql'; } $updater->addExtensionTable('uw_campaigns', $dbfile); $updater->addExtensionUpdate(array('addIndex', 'uw_campaigns', 'uw_campaigns_name', dirname(__FILE__) . '/sql/UW_IndexCampaignsName.sql', true)); $updater->addExtensionUpdate(array('addIndex', 'uw_campaigns', 'uw_campaigns_enabled', dirname(__FILE__) . '/sql/UW_IndexCampaignsEnabled.sql', true)); return true; }
/** * Schema update to set up the needed database tables. * * @since 0.1 * * @param DatabaseUpdater $updater * * @return true */ public static function onSchemaUpdate($updater = null) { global $wgDBtype; if ($wgDBtype == 'mysql') { // Set up the current schema. if ($updater === null) { global $wgExtNewTables, $wgExtNewIndexes, $wgExtNewFields; $wgExtNewTables[] = array('votes', dirname(__FILE__) . '/Ratings.sql', true); $wgExtNewTables[] = array('votes_props', dirname(__FILE__) . '/Ratings.sql', true); } else { $updater->addExtensionUpdate(array('addTable', 'votes', dirname(__FILE__) . '/Ratings.sql', true)); $updater->addExtensionUpdate(array('addTable', 'votes_props', dirname(__FILE__) . '/Ratings.sql', true)); } } return true; }
/** * Schema update to set up the needed database tables. * * @since 0.1 * * @param DatabaseUpdater $updater * * @return true */ public static function onSchemaUpdate($updater = null) { global $wgDBtype; if ($wgDBtype == 'mysql') { $updater->addExtensionUpdate(array('addTable', 'article_protection', dirname(__FILE__) . '/ArticleProtection.sql', true)); } return true; }
/** * @param DatabaseUpdater|null $updater * @return bool */ public static function ckSchema($updater = null) { if ($updater !== null) { $updater->addExtensionUpdate(array('addtable', 'online_status', dirname(__FILE__) . '/OnlineStatusBar.sql', true)); } else { global $wgExtNewTables; $wgExtNewTables[] = array('online_status', dirname(__FILE__) . '/OnlineStatusBar.sql'); } return true; }
public static function update(DatabaseUpdater $updater) { global $wgCityId, $wgDBname, $wgExternalSharedDB; $dir = self::get_patch_dir(); $ext_dir = self::get_extensions_dir(); $wikia_update = array(array('addTable', 'page_vote', $dir . 'patch-create-page_vote.sql', true), array('addTable', 'page_visited', $dir . 'patch-create-page_visited.sql', true), array('addTable', 'blog_listing_relation', $dir . 'patch-create-blog_listing_relation.sql', true), array('addTable', 'page_wikia_props', $ext_dir . '/wikia/ImageServing/sql/table.sql', true), array('addTable', 'wall_history', $ext_dir . '/wikia/Wall/sql/wall_history_local.sql', true), array('addTable', 'wall_related_pages', $ext_dir . '/wikia/Wall/sql/wall_related_pages.sql', true), array('addTable', 'ach_user_score', $dir . 'patch-create-achievements_user_score.sql', true), array('addTable', 'ach_user_badges', $dir . 'patch-create-achievements_user_badges.sql', true), array('addTable', 'ach_user_badges_notified', $dir . 'patch-create-achievements_user_badges_notified.sql', true), array('addTable', 'ach_user_counters', $dir . 'patch-create-achievements_user_counters.sql', true), array('addTable', 'ach_custom_badges', $dir . 'patch-create-achievements_custom_badges.sql', true), array('addTable', 'ach_ranking_snapshots', $dir . 'patch-create-achievements_ranking_snapshots.sql', true), array('addField', 'watchlist', 'wl_wikia_addedtimestamp', $dir . 'patch-watchlist-improvements.sql', true), array('addIndex', 'archive', 'page_revision', $dir . 'patch-index-archive-page_revision.sql', true), array('WikiaUpdater::do_page_vote_unique_update'), array('WikiaUpdater::do_page_wikia_props_update'), array('WikiaUpdater::do_drop_table', 'imagetags'), array('WikiaUpdater::do_drop_table', 'send_queue'), array('WikiaUpdater::do_drop_table', 'send_stats'), array('WikiaUpdater::do_drop_table', 'validate'), array('WikiaUpdater::do_drop_table', 'cur'), array('WikiaUpdater::do_drop_table', 'searchindex', !empty($wgCityId)), array('WikiaUpdater::do_drop_table', 'page_stats'), array('WikiaUpdater::do_drop_table', 'user_board'), array('WikiaUpdater::do_drop_table', 'user_points_monthly'), array('WikiaUpdater::do_drop_table', 'user_points_weekly'), array('WikiaUpdater::do_drop_table', 'user_gift'), array('WikiaUpdater::do_drop_table', 'user_relationship_request'), array('WikiaUpdater::do_drop_table', 'user_register_track'), array('WikiaUpdater::do_drop_table', 'user_board'), array('WikiaUpdater::do_drop_table', 'watchlist_old'), array('WikiaUpdater::do_clean_math_table'), array('WikiaUpdater::do_transcache_update')); if ($wgDBname === $wgExternalSharedDB) { $wikia_update[] = array('addTable', 'city_list', $dir . 'wf/patch-create-city_list.sql', true); $wikia_update[] = array('addTable', 'city_list', $dir . 'wf/patch-create-city_cats.sql', true); } foreach ($wikia_update as $update) { $updater->addExtensionUpdate($update); } return true; }
public static function onLoadExtensionSchemaUpdates(DatabaseUpdater $updater) { $tables = array('wp_plan', 'wp_subscription', 'wp_old_usage', 'wp_wikiplace', 'wp_page', 'wp_old_subscription', 'wp_invitation', 'wp_invitation_category', 'wp_wpi_wpp', 'wp_member'); $mysql_dir = dirname(__FILE__) . '/schema/mysql'; foreach ($tables as $table) { $updater->addExtensionUpdate(array('addTable', $table, "{$mysql_dir}/{$table}.sql", true)); } $db = wfGetDB(DB_MASTER); if ($db->tableExists('wp_subscription') && !$db->fieldExists('wp_subscription', 'wps_wpi_id', __METHOD__)) { $db->sourceFile("{$mysql_dir}/add_wps_wpi_field.sql"); } if ($db->tableExists('wp_old_subscription') && !$db->fieldExists('wp_old_subscription', 'wpos_wpi_id', __METHOD__)) { $db->sourceFile("{$mysql_dir}/add_wpos_wpi_field.sql"); } return true; }
public static function addDatabases(DatabaseUpdater $updater) { $updater->addExtensionUpdate(array('addTable', SqlSentences::$ratingRecordTable, __DIR__ . '/sql/create-rating-history-table.sql', true)); return true; }
/** * Schema update to set up the needed database tables. * * @since 0.1 * * @param DatabaseUpdater $updater * * @return true */ public static function onSchemaUpdate($updater = null) { global $wgDBtype, $egLiveTranslateIP; if ($wgDBtype == 'mysql') { // Set up the current schema. if ($updater === null) { global $wgExtNewTables, $wgExtNewIndexes, $wgExtNewFields; $wgExtNewTables[] = array('live_translate', $egLiveTranslateIP . '/LiveTranslate.sql', true); $wgExtNewTables[] = array('live_translate_memories', $egLiveTranslateIP . '/LiveTranslate.sql', true); $wgExtNewIndexes[] = array('live_translate', 'word_translation', $egLiveTranslateIP . '/sql/LT_IndexWordTranslation.sql', true); $wgExtNewFields[] = array('live_translate', 'memory_id', $egLiveTranslateIP . '/sql/LT_addTMField.sql'); $wgExtNewFields[] = array('live_translate_memories', 'memory_version_hash', $egLiveTranslateIP . '/sql/LT_addTMHashField.sql'); } else { $updater->addExtensionUpdate(array('addTable', 'live_translate', $egLiveTranslateIP . '/LiveTranslate.sql', true)); $updater->addExtensionUpdate(array('addTable', 'live_translate_memories', $egLiveTranslateIP . '/LiveTranslate.sql', true)); $updater->addExtensionUpdate(array('addIndex', 'live_translate', 'word_translation', $egLiveTranslateIP . '/sql/LT_IndexWordTranslation.sql', true)); $updater->addExtensionUpdate(array('addField', 'live_translate', 'memory_id', $egLiveTranslateIP . '/sql/LT_addTMField.sql', true)); $updater->addExtensionUpdate(array('addField', 'live_translate_memories', 'memory_version_hash', $egLiveTranslateIP . '/sql/LT_addTMHashField.sql', true)); } } return true; }
/** Wikia change -- moved getClientIPfromXFF() method to IP class */ public static function checkUserSchemaUpdates(DatabaseUpdater $updater) { $base = dirname(__FILE__); $updater->addExtensionUpdate(array('CheckUserHooks::checkUserCreateTables')); if ($updater->getDB()->getType() == 'mysql') { $updater->addExtensionUpdate(array('addIndex', 'cu_changes', 'cuc_ip_hex_time', "{$base}/archives/patch-cu_changes_indexes.sql", true)); $updater->addExtensionUpdate(array('addIndex', 'cu_changes', 'cuc_user_ip_time', "{$base}/archives/patch-cu_changes_indexes2.sql", true)); } return true; }
/** * Schema update to set up the needed database tables. * * @since 0.1 * * @param DatabaseUpdater $updater * * @return true */ public static function onSchemaUpdate( /* DatabaseUpdater */ $updater = null ) { global $wgDBtype; if ( $wgDBtype == 'mysql' ) { $updater->addExtensionUpdate( array( 'addTable', 'swl_groups', dirname( __FILE__ ) . '/SemanticWatchlist.sql', true ) ); $updater->addExtensionUpdate( array( 'addTable', 'swl_changes', dirname( __FILE__ ) . '/SemanticWatchlist.sql', true ) ); $updater->addExtensionUpdate( array( 'addTable', 'swl_sets', dirname( __FILE__ ) . '/SemanticWatchlist.sql', true ) ); $updater->addExtensionUpdate( array( 'addTable', 'swl_edits_per_group', dirname( __FILE__ ) . '/SemanticWatchlist.sql', true ) ); $updater->addExtensionUpdate( array( 'addTable', 'swl_sets_per_group', dirname( __FILE__ ) . '/SemanticWatchlist.sql', true ) ); $updater->addExtensionUpdate( array( 'addTable', 'swl_users_per_group', dirname( __FILE__ ) . '/SemanticWatchlist.sql', true ) ); } return true; }
/** * Hook: LoadExtensionSchemaUpdates * @param $updater DatabaseUpdater * @return bool */ public static function schemaUpdates(DatabaseUpdater $updater) { $dir = __DIR__ . '/sql'; $updater->addExtensionUpdate(array('addTable', 'translate_sections', "{$dir}/translate_sections.sql", true)); $updater->addExtensionUpdate(array('addField', 'translate_sections', 'trs_order', "{$dir}/translate_sections-trs_order.patch.sql", true)); $updater->addExtensionUpdate(array('addTable', 'revtag', "{$dir}/revtag.sql", true)); $updater->addExtensionUpdate(array('addTable', 'translate_groupstats', "{$dir}/translate_groupstats.sql", true)); $updater->addExtensionUpdate(array('addIndex', 'translate_sections', 'trs_page_order', "{$dir}/translate_sections-indexchange.sql", true)); $updater->addExtensionUpdate(array('dropIndex', 'translate_sections', 'trs_page', "{$dir}/translate_sections-indexchange2.sql", true)); $updater->addExtensionUpdate(array('addTable', 'translate_reviews', "{$dir}/translate_reviews.sql", true)); $updater->addExtensionUpdate(array('addTable', 'translate_groupreviews', "{$dir}/translate_groupreviews.sql", true)); $updater->addExtensionUpdate(array('addTable', 'translate_tms', "{$dir}/translate_tm.sql", true)); $updater->addExtensionUpdate(array('addTable', 'translate_metadata', "{$dir}/translate_metadata.sql", true)); $updater->addExtensionUpdate(array('addTable', 'translate_messageindex', "{$dir}/translate_messageindex.sql", true)); $updater->addExtensionUpdate(array('addIndex', 'translate_groupstats', 'tgs_lang', "{$dir}/translate_groupstats-indexchange.sql", true)); $updater->addExtensionUpdate(array('addField', 'translate_groupstats', 'tgs_proofread', "{$dir}/translate_groupstats-proofread.sql", true)); $updater->addExtensionUpdate(array('addTable', 'translate_stash', "{$dir}/translate_stash.sql", true)); return true; }
/** * Setups and Modifies Database Information * * @access public * @param object [Optional] DatabaseUpdater Object * @return boolean true */ public static function onLoadExtensionSchemaUpdates(DatabaseUpdater $updater = null) { $extDir = __DIR__; $updater->addExtensionUpdate([[__CLASS__, 'createDPLTemplate']]); return true; }
/** * Setups and Modifies Database Information * * @access public * @param object [Optional] DatabaseUpdater Object * @return boolean true */ public static function onLoadExtensionSchemaUpdates(DatabaseUpdater $updater = null) { $extDir = __DIR__; $updater->addExtensionUpdate(['addTable', 'gwl_watchlist', "{$extDir}/install/sql/globalwatchlist_table_gwl_watchlist.sql", true]); $updater->addExtensionUpdate(['addTable', 'gwl_settings', "{$extDir}/install/sql/globalwatchlist_table_gwl_settings.sql", true]); return true; }
/** * Schema update to set up the needed database tables. * @see https://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates * * @since 1.7 * * @param DatabaseUpdater $updater|null * * @return boolean */ public static function onSchemaUpdate(DatabaseUpdater $updater = null) { $updater->addExtensionUpdate(array('SMWStore::setupStore')); return true; }
public static function addSchemaUpdates(DatabaseUpdater $du) { global $wgDBtype; if ($wgDBtype == 'mysql') { $base = dirname(__FILE__) . '/mysql'; // Initial install tables (current schema) $du->addExtensionUpdate(array('addTable', 'flaggedrevs', "{$base}/FlaggedRevs.sql", true)); // Updates (in order)... $du->addExtensionUpdate(array('addField', 'flaggedpage_config', 'fpc_expiry', "{$base}/patch-fpc_expiry.sql", true)); $du->addExtensionUpdate(array('addIndex', 'flaggedpage_config', 'fpc_expiry', "{$base}/patch-expiry-index.sql", true)); $du->addExtensionUpdate(array('addTable', 'flaggedrevs_promote', "{$base}/patch-flaggedrevs_promote.sql", true)); $du->addExtensionUpdate(array('addTable', 'flaggedpages', "{$base}/patch-flaggedpages.sql", true)); $du->addExtensionUpdate(array('addField', 'flaggedrevs', 'fr_img_name', "{$base}/patch-fr_img_name.sql", true)); $du->addExtensionUpdate(array('addTable', 'flaggedrevs_tracking', "{$base}/patch-flaggedrevs_tracking.sql", true)); $du->addExtensionUpdate(array('addField', 'flaggedpages', 'fp_pending_since', "{$base}/patch-fp_pending_since.sql", true)); $du->addExtensionUpdate(array('addField', 'flaggedpage_config', 'fpc_level', "{$base}/patch-fpc_level.sql", true)); $du->addExtensionUpdate(array('addTable', 'flaggedpage_pending', "{$base}/patch-flaggedpage_pending.sql", true)); $du->addExtensionUpdate(array('FlaggedRevsUpdaterHooks::doFlaggedImagesTimestampNULL', "{$base}/patch-fi_img_timestamp.sql")); $du->addExtensionUpdate(array('FlaggedRevsUpdaterHooks::doFlaggedRevsRevTimestamp', "{$base}/patch-fr_page_rev-index.sql")); $du->addExtensionUpdate(array('addTable', 'flaggedrevs_statistics', "{$base}/patch-flaggedrevs_statistics.sql", true)); } elseif ($wgDBtype == 'postgres') { $base = dirname(__FILE__) . '/postgres'; // Initial install tables (current schema) $du->addExtensionUpdate(array('addTable', 'flaggedrevs', "{$base}/FlaggedRevs.pg.sql", true)); // Updates (in order)... $du->addExtensionUpdate(array('addField', 'flaggedpage_config', 'fpc_expiry', "TIMESTAMPTZ NULL")); $du->addExtensionUpdate(array('addIndex', 'flaggedpage_config', 'fpc_expiry', "{$base}/patch-expiry-index.sql", true)); $du->addExtensionUpdate(array('addTable', 'flaggedrevs_promote', "{$base}/patch-flaggedrevs_promote.sql", true)); $du->addExtensionUpdate(array('addTable', 'flaggedpages', "{$base}/patch-flaggedpages.sql", true)); $du->addExtensionUpdate(array('addIndex', 'flaggedrevs', 'fr_img_sha1', "{$base}/patch-fr_img_name.sql", true)); $du->addExtensionUpdate(array('addTable', 'flaggedrevs_tracking', "{$base}/patch-flaggedrevs_tracking.sql", true)); $du->addExtensionUpdate(array('addIndex', 'flaggedpages', 'fp_pending_since', "{$base}/patch-fp_pending_since.sql", true)); $du->addExtensionUpdate(array('addField', 'flaggedpage_config', 'fpc_level', "TEXT NULL")); $du->addExtensionUpdate(array('addTable', 'flaggedpage_pending', "{$base}/patch-flaggedpage_pending.sql", true)); $du->addExtensionUpdate(array('FlaggedRevsUpdaterHooks::doFlaggedImagesTimestampNULL', "{$base}/patch-fi_img_timestamp.sql")); $du->addExtensionUpdate(array('FlaggedRevsUpdaterHooks::doFlaggedRevsRevTimestamp', "{$base}/patch-fr_page_rev-index.sql")); $du->addExtensionUpdate(array('addTable', 'flaggedrevs_statistics', "{$base}/patch-flaggedrevs_statistics.sql", true)); } elseif ($wgDBtype == 'sqlite') { $base = dirname(__FILE__) . '/mysql'; $du->addExtensionUpdate(array('addTable', 'flaggedrevs', "{$base}/FlaggedRevs.sql", true)); } return true; }
/** * Creates the necessary database table when the user runs * maintenance/update.php. * * @param DatabaseUpdater $updater * @return bool */ public static function addTable($updater) { $dbt = $updater->getDB()->getType(); $file = __DIR__ . "/vote.{$dbt}"; if (file_exists($file)) { $updater->addExtensionUpdate(array('addTable', 'Vote', $file, true)); } else { throw new MWException("VoteNY does not support {$dbt}."); } return true; }