Conditions | 2 |
Paths | 2 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function changeSchema(Schema $schema, array $options) { |
||
30 | $prefix = $options['tablePrefix']; |
||
31 | if (!$schema->hasTable("{$prefix}paperhive")) { |
||
32 | $table = $schema->createTable("{$prefix}paperhive"); |
||
33 | |||
34 | $table->addColumn('fileid', 'integer', [ |
||
35 | 'length' => 20, |
||
36 | 'notnull' => true, |
||
37 | 'unsigned' => true, |
||
38 | ]); |
||
39 | |||
40 | $table->addColumn('bookid', 'string', [ |
||
41 | 'length' => 64, |
||
42 | 'notnull' => true, |
||
43 | 'default' => '' |
||
44 | ]); |
||
45 | |||
46 | $table->addIndex( |
||
47 | ['fileid'], |
||
48 | 'paperhive_fileid_index' |
||
49 | ); |
||
50 | } |
||
51 | } |
||
52 | } |
||
53 |