Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 11 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
Version010315Date20210830235504 | |
0.00% |
0 / 11 |
|
0.00% |
0 / 4 |
30 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
preSchemaChange | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
changeSchema | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
6 | |||
postSchemaChange | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace OCA\Cospend\Migration; |
6 | |
7 | use Closure; |
8 | use OCP\DB\ISchemaWrapper; |
9 | use OCP\DB\Types; |
10 | use OCP\Migration\SimpleMigrationStep; |
11 | use OCP\Migration\IOutput; |
12 | |
13 | class Version010315Date20210830235504 extends SimpleMigrationStep { |
14 | |
15 | public function __construct() { |
16 | } |
17 | |
18 | /** |
19 | * @param IOutput $output |
20 | * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
21 | * @param array $options |
22 | */ |
23 | public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { |
24 | } |
25 | |
26 | /** |
27 | * @param IOutput $output |
28 | * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
29 | * @param array $options |
30 | * @return null|ISchemaWrapper |
31 | */ |
32 | public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
33 | /** @var ISchemaWrapper $schema */ |
34 | $schema = $schemaClosure(); |
35 | $table = $schema->getTable('cospend_shares'); |
36 | if (!$table->hasColumn('password')) { |
37 | $table->addColumn('password', Types::STRING, [ |
38 | 'notnull' => false, |
39 | 'length' => 64, |
40 | ]); |
41 | } |
42 | return $schema; |
43 | } |
44 | |
45 | /** |
46 | * @param IOutput $output |
47 | * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
48 | * @param array $options |
49 | */ |
50 | public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { |
51 | } |
52 | } |