Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 9
0.00% covered (danger)
0.00%
0 / 4
CRAP
0.00% covered (danger)
0.00%
0 / 1
Version010403Date20211112144733
0.00% covered (danger)
0.00%
0 / 9
0.00% covered (danger)
0.00%
0 / 4
42
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 / 6
0.00% covered (danger)
0.00%
0 / 1
12
 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;
11
12class Version010403Date20211112144733 extends SimpleMigrationStep {
13
14    public function __construct() {
15    }
16
17    /**
18     * @param IOutput $output
19     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
20     * @param array $options
21     */
22    public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
23    }
24
25    /**
26     * @param IOutput $output
27     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
28     * @param array $options
29     * @return null|ISchemaWrapper
30     */
31    public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
32        /** @var ISchemaWrapper $schema */
33        $schema = $schemaClosure();
34        if ($schema->hasTable('cospend_project_categories')) {
35            $schema->dropTable('cospend_project_categories');
36        }
37        if ($schema->hasTable('cospend_project_paymentmodes')) {
38            $schema->dropTable('cospend_project_paymentmodes');
39        }
40        return $schema;
41    }
42
43    /**
44     * @param IOutput $output
45     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
46     * @param array $options
47     */
48    public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
49    }
50}