当前位置: 首页>>代码示例>>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;未经允许,请勿转载。