Conditions | 2 |
Paths | 2 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function changeSchema(Schema $schema, array $options) { |
||
14 | $prefix = $options['tablePrefix']; |
||
15 | if (!$schema->hasTable("{$prefix}paperhive")) { |
||
16 | $table = $schema->createTable("{$prefix}paperhive"); |
||
17 | |||
18 | $table->addColumn('fileid', 'integer', [ |
||
19 | 'length' => 20, |
||
20 | 'notnull' => true, |
||
21 | 'unsigned' => true, |
||
22 | ]); |
||
23 | |||
24 | $table->addColumn('bookid', 'string', [ |
||
25 | 'length' => 64, |
||
26 | 'notnull' => true, |
||
27 | 'default' => '' |
||
28 | ]); |
||
29 | |||
30 | $table->addIndex( |
||
31 | ['fileid'], |
||
32 | 'paperhive_fileid_index' |
||
33 | ); |
||
34 | } |
||
35 | } |
||
36 | } |
||
37 |