Completed
Push — master ( a7ac36...44c26f )
by Jeroen De
02:07 queued 10s
created

TermStoreSchemaUpdater::getDdlSqlFilePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Wikibase\TermStore\MediaWiki;
4
5
use DatabaseUpdater;
6
7
class TermStoreSchemaUpdater {
8
9
	private $updater;
10
11
	private function __construct( DatabaseUpdater $updater ) {
12
		$this->updater = $updater;
13
	}
14
15
	public static function onSchemaUpdate( DatabaseUpdater $updater ) {
16
		( new self( $updater ) )->updateSchema();
17
	}
18
19
	public static function getDdlSqlFilePath() {
20
		return __DIR__ . '/PackagePrivate/AddNormalizedTermsTablesDDL.sql';
21
	}
22
23
	private function updateSchema() {
24
		$this->updater->addExtensionTable(
25
			'wbt_item_terms',
26
			self::getDdlSqlFilePath()
27
		);
28
	}
29
30
}
31