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