Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function changeSchema(Schema $schema, array $options) { |
||
13 | // Get the table |
||
14 | $prefix = $options['tablePrefix']; |
||
15 | $table = $schema->getTable("{$prefix}migrations"); |
||
16 | |||
17 | // Check column length to see if migration is necessary necessary |
||
18 | if($table->getColumn('app')->getLength() === 177) { |
||
19 | // then this server was installed after the fix |
||
20 | return; |
||
21 | } |
||
22 | |||
23 | // Need to shorten columns |
||
24 | $table->getColumn('app')->setLength(177); |
||
25 | $table->getColumn('version')->setLength(14); |
||
26 | } |
||
27 | } |
||
28 |