Final Class M240409200600CreateQueueTable
| Inheritance | M240409200600CreateQueueTable |
|---|---|
| Implements | Yiisoft\Db\Migration\RevertibleMigrationInterface, Yiisoft\Db\Migration\TransactionalMigrationInterface |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| down() | M240409200600CreateQueueTable | |
| up() | M240409200600CreateQueueTable |
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| QUEUE_TABLE | 'queue' | M240409200600CreateQueueTable |
Method Details
| public void down ( \Yiisoft\Db\Migration\MigrationBuilder $b ) | ||
| $b | \Yiisoft\Db\Migration\MigrationBuilder | |
public function down(MigrationBuilder $b): void
{
$b->dropTable(self::QUEUE_TABLE);
}
| public void up ( \Yiisoft\Db\Migration\MigrationBuilder $b ) | ||
| $b | \Yiisoft\Db\Migration\MigrationBuilder | |
public function up(MigrationBuilder $b): void
{
$b->createTable(
self::QUEUE_TABLE,
[
'id' => 'int NOT NULL AUTO_INCREMENT',
'channel' => 'varchar(255) NOT NULL',
'job' => 'blob NOT NULL',
'pushed_at' => 'int NOT NULL',
'ttr' => 'int NOT NULL',
'delay' => 'int NOT NULL DEFAULT 0',
'priority' => 'int UNSIGNED NOT NULL DEFAULT 1024',
'reserved_at' => 'int DEFAULT NULL',
'attempt' => 'int DEFAULT NULL',
'done_at' => 'int DEFAULT NULL',
'PRIMARY KEY ([[id]])',
'KEY channel ([[channel]])',
'KEY reserved_at ([[reserved_at]])',
'KEY priority ([[priority]])',
],
);
}
Signup or Login in order to comment.