for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace hiqdev\assetpackagist\migrations;
use yii\db\Migration;
/**
* Migration for queue message storage
*
* @author Roman Zhuravlev <[email protected]>
*/
class m161129_140000_queue extends Migration
{
public $tableName = '{{%queue}}';
public $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
public function up()
$this->createTable($this->tableName, [
'id' => $this->primaryKey(),
'channel' => $this->string()->notNull(),
'job' => $this->binary()->notNull(),
'created_at' => $this->integer()->notNull(),
'started_at' => $this->integer(),
'finished_at' => $this->integer(),
], $this->tableOptions);
$this->createIndex('channel', $this->tableName, 'channel');
$this->createIndex('started_at', $this->tableName, 'started_at');
}
public function down()
$this->dropTable($this->tableName);