コード例 #1
0
 /**
  * @param DatabaseUpdater $updater
  */
 public function doSchemaUpdate(DatabaseUpdater $updater)
 {
     $db = $updater->getDB();
     $type = $db->getType();
     if ($type !== 'mysql' && $type !== 'sqlite') {
         wfWarn("Database type '{$type}' is not supported by the Wikibase repository.");
         return;
     }
     $this->addChangesTable($updater, $type);
     // Update from 0.1.
     if (!$db->tableExists('wb_terms')) {
         $updater->dropTable('wb_items_per_site');
         $updater->dropTable('wb_items');
         $updater->dropTable('wb_aliases');
         $updater->dropTable('wb_texts_per_lang');
         $updater->addExtensionTable('wb_terms', $this->getUpdateScriptPath('Wikibase', $db->getType()));
         $this->store->rebuild();
     }
     $this->updateEntityPerPageTable($updater, $db);
     $this->updateTermsTable($updater, $db);
     $this->updateItemsPerSiteTable($updater, $db);
     $this->updateChangesTable($updater, $db);
     $this->registerPropertyInfoTableUpdates($updater);
 }
コード例 #2
0
 /**
  * @dataProvider instanceProvider
  */
 public function testGetSiteLinkConflictLookup(Store $store)
 {
     $this->assertInstanceOf('\\Wikibase\\Repo\\Store\\SiteLinkConflictLookup', $store->getSiteLinkConflictLookup());
 }