Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
9 | 52 | public function postGenerateSchema(GenerateSchemaEventArgs $event) |
|
10 | { |
||
11 | 52 | $schema = $event->getSchema(); |
|
12 | |||
13 | // When using multiple entity managers ignore events that are triggered by other entity managers. |
||
14 | 52 | if ($event->getEntityManager()->getMetadataFactory()->isTransient('JMS\JobQueueBundle\Entity\Job')) { |
|
15 | 22 | return; |
|
16 | } |
||
17 | |||
18 | 52 | $table = $schema->createTable('jms_job_statistics'); |
|
19 | 52 | $table->addColumn('job_id', 'bigint', array('notnull' => true, 'unsigned' => true)); |
|
20 | 52 | $table->addColumn('characteristic', 'string', array('length' => 30, 'notnull' => true)); |
|
21 | 52 | $table->addColumn('createdAt', 'datetime', array('notnull' => true)); |
|
22 | 52 | $table->addColumn('charValue', 'float', array('notnull' => true)); |
|
23 | 52 | $table->setPrimaryKey(array('job_id', 'characteristic', 'createdAt')); |
|
24 | } |
||
25 | } |