diff --git a/Entity/Listener/StatisticsListener.php b/Entity/Listener/StatisticsListener.php index e25d7c64..a8c8da5f 100644 --- a/Entity/Listener/StatisticsListener.php +++ b/Entity/Listener/StatisticsListener.php @@ -16,10 +16,12 @@ public function postGenerateSchema(GenerateSchemaEventArgs $event) } $table = $schema->createTable('jms_job_statistics'); + $table->addColumn('id', 'bigint', array('nullable' => false, 'unsigned' => true, 'autoincrement' => true)); $table->addColumn('job_id', 'bigint', array('nullable' => false, 'unsigned' => true)); $table->addColumn('characteristic', 'string', array('length' => 30, 'nullable' => false)); $table->addColumn('createdAt', 'datetime', array('nullable' => false)); $table->addColumn('charValue', 'float', array('nullable' => false)); - $table->setPrimaryKey(array('job_id', 'characteristic', 'createdAt')); + $table->setPrimaryKey(array('id')); + $table->addIndex(array('job_id')); } } \ No newline at end of file