Total Complexity | 3 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class Version000604Date20200908224225 extends SimpleMigrationStep { |
||
17 | |||
18 | /** @var IDBConnection */ |
||
19 | protected $connection; |
||
20 | |||
21 | public function __construct(IDBConnection $connection) { |
||
22 | $this->connection = $connection; |
||
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 | |||
35 | $personsTable = $schema->getTable('facerecog_persons'); |
||
36 | $personsTable->changeColumn('name', [ |
||
37 | 'notnull' => false, |
||
38 | 'default' => null, |
||
39 | ]); |
||
40 | |||
41 | return $schema; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @param IOutput $output |
||
46 | * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
||
47 | * @param array $options |
||
48 | */ |
||
49 | public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { |
||
55 | } |
||
56 | |||
57 | } |
||
58 |