@@ 25-38 (lines=14) @@ | ||
22 | public $tableName = '{{%queue}}'; |
|
23 | public $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; |
|
24 | ||
25 | public function up() |
|
26 | { |
|
27 | $this->createTable($this->tableName, [ |
|
28 | 'id' => $this->primaryKey(), |
|
29 | 'channel' => $this->string()->notNull(), |
|
30 | 'job' => $this->binary()->notNull(), |
|
31 | 'created_at' => $this->integer()->notNull(), |
|
32 | 'started_at' => $this->integer(), |
|
33 | 'finished_at' => $this->integer(), |
|
34 | ], $this->tableOptions); |
|
35 | ||
36 | $this->createIndex('channel', $this->tableName, 'channel'); |
|
37 | $this->createIndex('started_at', $this->tableName, 'started_at'); |
|
38 | } |
|
39 | ||
40 | public function down() |
|
41 | { |
@@ 44-57 (lines=14) @@ | ||
41 | $this->createIndex('priority', $this->tableName, 'priority'); |
|
42 | } |
|
43 | ||
44 | public function down() |
|
45 | { |
|
46 | $this->dropTable($this->tableName); |
|
47 | $this->createTable($this->tableName, [ |
|
48 | 'id' => $this->primaryKey(), |
|
49 | 'channel' => $this->string()->notNull(), |
|
50 | 'job' => $this->binary()->notNull(), |
|
51 | 'created_at' => $this->integer()->notNull(), |
|
52 | 'started_at' => $this->integer(), |
|
53 | 'finished_at' => $this->integer(), |
|
54 | ]); |
|
55 | $this->createIndex('channel', $this->tableName, 'channel'); |
|
56 | $this->createIndex('started_at', $this->tableName, 'started_at'); |
|
57 | } |
|
58 | } |
|
59 |