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
Version000408Date20200430162436
0.00% covered (danger)
0.00%
0 / 11
0.00% covered (danger)
0.00%
0 / 4
20
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
2
 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\Migration\SimpleMigrationStep;
10use OCP\Migration\IOutput;
11use OCP\DB\QueryBuilder\IQueryBuilder;
12use OCP\IDBConnection;
13
14/**
15 * Auto-generated migration step: Please modify to your needs!
16 */
17class Version000408Date20200430162436 extends SimpleMigrationStep {
18
19    /** @var IDBConnection */
20    private $connection;
21
22    /**
23     * @param IDBConnection $connection
24     */
25    public function __construct(IDBConnection $connection) {
26        $this->connection = $connection;
27    }
28
29    /**
30     * @param IOutput $output
31     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
32     * @param array $options
33     */
34    public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
35    }
36
37    /**
38     * @param IOutput $output
39     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
40     * @param array $options
41     * @return null|ISchemaWrapper
42     */
43    public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
44        /** @var ISchemaWrapper $schema */
45        $schema = $schemaClosure();
46        $table = $schema->getTable('cospend_bills');
47        $table->addColumn('comment', 'string', [
48            'notnull' => false,
49            'length' => 300,
50            'default' => null
51        ]);
52        return $schema;
53    }
54
55    /**
56     * @param IOutput $output
57     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
58     * @param array $options
59     */
60    public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
61    }
62}