Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 1.0002 |
Changes | 0 |
1 | <?php |
||
37 | 8 | protected static function createMessagesTable(Schema $schema) |
|
38 | { |
||
39 | 8 | $table = $schema->createTable('bernard_messages'); |
|
40 | 8 | $table->addColumn('id', 'integer', [ |
|
41 | 8 | 'autoincrement' => true, |
|
42 | 8 | 'unsigned' => true, |
|
43 | 8 | 'notnull' => true, |
|
44 | 8 | ]); |
|
45 | |||
46 | 8 | $table->addColumn('queue', 'string'); |
|
47 | 8 | $table->addColumn('message', 'text'); |
|
48 | 8 | $table->addColumn('visible', 'boolean', ['default' => true]); |
|
49 | 8 | $table->addColumn('sentAt', 'datetime'); |
|
50 | 8 | $table->setPrimaryKey(['id']); |
|
51 | 8 | $table->addIndex(['queue', 'sentAt', 'visible']); |
|
52 | 8 | } |
|
53 | } |
||
54 |