Conditions | 2 |
Paths | 2 |
Total Lines | 23 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
9 | public function changeSchema(Schema $schema, array $options) { |
||
10 | $prefix = $options['tablePrefix']; |
||
11 | if (!$schema->hasTable("{$prefix}federated_reshares")) { |
||
12 | $table = $schema->createTable("{$prefix}federated_reshares"); |
||
13 | $table->addColumn('share_id', 'bigint', [ |
||
14 | 'unsigned' => false, |
||
15 | 'notnull' => true, |
||
16 | 'length' => 11, |
||
17 | ]); |
||
18 | |||
19 | $table->addColumn('remote_id', 'bigint', [ |
||
20 | 'unsigned' => false, |
||
21 | 'notnull' => true, |
||
22 | 'length' => 11, |
||
23 | 'comment' => 'share ID at the remote server' |
||
24 | ]); |
||
25 | |||
26 | $table->addUniqueIndex( |
||
27 | ['share_id'], |
||
28 | 'share_id_index' |
||
29 | ); |
||
30 | } |
||
31 | } |
||
32 | } |
||
33 |