migrations/Version20230209150428.php line 1
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230209150428 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE catchable_queue (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, template_id INT NOT NULL, voucher VARCHAR(255) DEFAULT NULL, is_claimed TINYINT(1) NOT NULL, updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', UNIQUE INDEX UNIQ_CA9BF33A76ED395 (user_id), INDEX IDX_CA9BF335DA0FB8 (template_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE catchable_queue ADD CONSTRAINT FK_CA9BF33A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE catchable_queue ADD CONSTRAINT FK_CA9BF335DA0FB8 FOREIGN KEY (template_id) REFERENCES template (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE catchable_queue DROP FOREIGN KEY FK_CA9BF33A76ED395');
$this->addSql('ALTER TABLE catchable_queue DROP FOREIGN KEY FK_CA9BF335DA0FB8');
$this->addSql('DROP TABLE catchable_queue');
}
}