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