Completed
Push — master ( c4929a...3bd4fb )
by Julius
19:34 queued 18:15
created

Version2060Date20200302132145::changeSchema()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 0
cts 9
cp 0
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace OCA\Richdocuments\Migration;
6
7
use Closure;
8
use OCP\DB\ISchemaWrapper;
9
use OCP\Migration\IOutput;
10
use OCP\Migration\SimpleMigrationStep;
11
12
class Version2060Date20200302132145 extends SimpleMigrationStep {
13
14
	/**
15
	 * @param IOutput $output
16
	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
17
	 * @param array $options
18
	 * @return null|ISchemaWrapper
19
	 */
20
	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
21
		/** @var ISchemaWrapper $schema */
22
		$schema = $schemaClosure();
23
24
		$table = $schema->getTable('richdocuments_wopi');
25
		$table->addColumn('share', 'string', [
26
			'notnull' => false,
27
			'length' => 64
28
		]);
29
30
		return $schema;
31
	}
32
33
}
34