當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DatabaseUpdater::addExtensionTable方法代碼示例

本文整理匯總了PHP中DatabaseUpdater::addExtensionTable方法的典型用法代碼示例。如果您正苦於以下問題:PHP DatabaseUpdater::addExtensionTable方法的具體用法?PHP DatabaseUpdater::addExtensionTable怎麽用?PHP DatabaseUpdater::addExtensionTable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DatabaseUpdater的用法示例。


在下文中一共展示了DatabaseUpdater::addExtensionTable方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: addSchemaUpdates

 /**
  * @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;
 }
開發者ID:realsoc,項目名稱:mediawiki-extensions,代碼行數:29,代碼來源:ConfirmAccountUpdater.hooks.php

示例2: SetupSchema

	public static function SetupSchema( DatabaseUpdater $du ) {
		$base = dirname( __FILE__ ) . '/schema';
		$du->addExtensionTable( "ratings", "$base/ratings.sql");
		$du->addExtensionTable( "project_stats", "$base/project_stats.sql" );
		$du->addExtensionTable( "assessment_changelog", "$base/log.sql" );
		$du->addExtensionTable( "selections", "$base/selections.sql" );
		return true;
	}
開發者ID:realsoc,項目名稱:mediawiki-extensions,代碼行數:8,代碼來源:SelectionSifter.hooks.php

示例3: SemanticMailMerge_SchemaUpdates

function SemanticMailMerge_SchemaUpdates(DatabaseUpdater $updater)
{
    $sqldir = __DIR__ . '/maintenance/';
    $updater->addExtensionTable('smw_mailmerge', $sqldir . 'table.sql');
    $updater->addExtensionIndex('smw_mailmerge', 'title', $sqldir . 'index.sql');
    return true;
}
開發者ID:ATCARES,項目名稱:SemanticMailMerge,代碼行數:7,代碼來源:SemanticMailMerge.php

示例4: onSchemaUpdate

 /**
  * 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;
 }
開發者ID:JeroenDeDauw,項目名稱:UploadWizard,代碼行數:17,代碼來源:UploadWizardHooks.php

示例5: onSchemaUpdate

 /**
  * 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;
 }
開發者ID:schwarer2006,項目名稱:wikia,代碼行數:18,代碼來源:EducationProgram.hooks.php

示例6: onLoadExtensionSchemaUpdates

 /**
  * LoadExtensionSchemaUpdates hook handler
  * @see https://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates
  * @param DatabaseUpdater $updater
  */
 public static function onLoadExtensionSchemaUpdates(DatabaseUpdater $updater)
 {
     if ($updater->getDB()->getType() != 'mysql') {
         throw new MWException('GeoData extension currently supports only MySQL');
     }
     $updater->addExtensionTable('geo_tags', dirname(__FILE__) . '/GeoData.sql');
     return true;
 }
開發者ID:realsoc,項目名稱:mediawiki-extensions,代碼行數:13,代碼來源:GeoDataHooks.php

示例7: onSchemaUpdate

 /**
  * 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;
 }
開發者ID:realsoc,項目名稱:mediawiki-extensions,代碼行數:19,代碼來源:EducationProgram.hooks.php

示例8: onSchemaUpdate

 /**
  * 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;
 }
開發者ID:robksawyer,項目名稱:lathe.tools,代碼行數:20,代碼來源:UploadWizardHooks.php

示例9: asUpdateSchema

 /**
  * @param $updater DatabaseUpdater
  * @return bool
  */
 public static function asUpdateSchema(DatabaseUpdater $updater)
 {
     $updater->addExtensionTable('spoofuser', __DIR__ . '/sql/patch-antispoof.' . $updater->getDB()->getType() . '.sql');
     return true;
 }
開發者ID:jasonthebomb,項目名稱:mediawiki-extensions-AntiSpoof,代碼行數:9,代碼來源:AntiSpoofHooks.php

示例10: onLoadExtensionSchemaUpdates

 /**
  * @param DatabaseUpdater $updater
  */
 public static function onLoadExtensionSchemaUpdates($updater)
 {
     $updater->addExtensionTable('author_rating', dirname(__FILE__) . '/schema/author_rating.sql');
 }
開發者ID:vedmaka,項目名稱:SettleIn_authorRating,代碼行數:7,代碼來源:authorRating.hooks.php

示例11: onLoadExtensionSchemaUpdates

 /**
  * @param DatabaseUpdater $updater
  */
 public static function onLoadExtensionSchemaUpdates($updater)
 {
     global $wgOpauthLoginDir;
     $updater->addExtensionTable('opauth_login', $wgOpauthLoginDir . '/schema/opauth_login.sql');
 }
開發者ID:vedmaka,項目名稱:Mediawiki-OpauthLogin,代碼行數:8,代碼來源:OpauthLogin.hooks.php

示例12: onLoadExtensionSchemaUpdates

 /**
  * This will setup database tables for layer functionality.
  *
  * @since 3.0
  *
  * @param DatabaseUpdater $updater
  *
  * @return true 
  */
 public static function onLoadExtensionSchemaUpdates(DatabaseUpdater $updater)
 {
     switch ($GLOBALS['wgDBtype']) {
         case 'mysql':
         case 'sqlite':
             $updater->addExtensionTable('maps_layers', __DIR__ . '/schema/MapsLayers.sql');
             break;
         case 'postgres':
             $updater->addExtensionTable('maps_layers', __DIR__ . '/schema/MapsLayers-postgres.sql');
             break;
     }
     return true;
 }
開發者ID:gwdgithubnom,項目名稱:Maps,代碼行數:22,代碼來源:Maps.hooks.php

示例13: onLoadExtensionSchemaUpdates

 /**
  * This will setup database tables for layer functionality.
  *
  * @since 3.0
  *
  * @global type $wgDBtype
  * @param DatabaseUpdater $updater
  *
  * @return true 
  */
 public static function onLoadExtensionSchemaUpdates(DatabaseUpdater $updater)
 {
     global $wgDBtype;
     switch ($wgDBtype) {
         case 'mysql':
         case 'sqlite':
             $sqlPath = dirname(__FILE__) . '/schema/MapsLayers.sql';
             break;
             /** @ToDo: Support for Postgree SQL and others **/
     }
     $updater->addExtensionTable('maps_layers', $sqlPath);
     return true;
 }
開發者ID:whysasse,項目名稱:kmwiki,代碼行數:23,代碼來源:Maps.hooks.php

示例14: onLoadExtensionSchemaUpdates

 public static function onLoadExtensionSchemaUpdates(DatabaseUpdater $updater)
 {
     $dir = __DIR__ . '/sql';
     $updater->addExtensionTable('invitesignup', "{$dir}/invitesignup.sql");
 }
開發者ID:starnikser,項目名稱:mediawiki-extensions-InviteSignup,代碼行數:5,代碼來源:InviteSignupHooks.php

示例15: onLoadExtensionSchemaUpdates

 /**
  * This registers our database schema update(s)
  */
 public static function onLoadExtensionSchemaUpdates(DatabaseUpdater $updater)
 {
     $updater->addExtensionTable('spell_dict_word_list', dirname(__FILE__) . '/sql/spelling_dictionary.sql', true);
     return true;
 }
開發者ID:barbu110,項目名稱:mediawiki-spelling-dictionary,代碼行數:8,代碼來源:SpellingDictionary.hooks.php


注:本文中的DatabaseUpdater::addExtensionTable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。