4
0
mirror of https://github.com/AzuraCast/AzuraCast.git synced 2024-06-13 12:46:41 +00:00

Drop MessageQueue DB table (after move back to Redis queues)

This commit is contained in:
Buster "Silver Eagle" Neece 2020-09-26 20:24:29 -05:00
parent a2c0637386
commit 22851cccd8
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
2 changed files with 31 additions and 63 deletions

View File

@ -1,63 +0,0 @@
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Internal table used for Symfony Messenger handling.
*
* @ORM\Table(name="messenger_messages", indexes={
* @ORM\Index(columns={"queue_name"}),
* @ORM\Index(columns={"available_at"}),
* @ORM\Index(columns={"delivered_at"}),
* })
* @ORM\Entity()
*
* @internal
*/
class MessengerMessage
{
/**
* @ORM\Column(name="id", type="bigint")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
* @var int
*/
protected $id;
/**
* @ORM\Column(name="body", type="text")
* @var string
*/
protected $body;
/**
* @ORM\Column(name="headers", type="text")
* @var string
*/
protected $headers;
/**
* @ORM\Column(name="queue_name", type="string", length=190)
* @var string
*/
protected $queue_name;
/**
* @ORM\Column(name="created_at", type="datetime")
* @var \DateTime
*/
protected $created_at;
/**
* @ORM\Column(name="available_at", type="datetime")
* @var \DateTime
*/
protected $available_at;
/**
* @ORM\Column(name="delivered_at", type="datetime", nullable=true)
* @var \DateTime
*/
protected $delivered_at;
}

View File

@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace App\Entity\Migration;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20200927004829 extends AbstractMigration
{
public function getDescription(): string
{
return 'Drop Message Queue table.';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE messenger_messages');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_general_ci`, headers LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_general_ci`, queue_name VARCHAR(190) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_general_ci`, created_at DATETIME NOT NULL, available_at DATETIME NOT NULL, delivered_at DATETIME DEFAULT NULL, INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
}
}