<?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 Version20230907093257 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('DROP TABLE IF EXISTS phone_number_unsubscribes');
$this->addSql('CREATE TABLE phone_number_unsubscribes (id INT AUTO_INCREMENT NOT NULL, recipient_phone_number VARCHAR(255) NOT NULL, sender_id INT DEFAULT NULL, source VARCHAR(255) DEFAULT NULL, timestamp VARCHAR(255) DEFAULT NULL, deleted DATETIME DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE log CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE message message LONGTEXT DEFAULT NULL, CHANGE context context LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', CHANGE level level INT DEFAULT NULL, CHANGE extra extra LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
// $this->addSql('ALTER TABLE unsubscribes DROP INDEX RecipientEmail, ADD UNIQUE INDEX UNIQ_FC138E3C459EC945 (RecipientEmail)');
$this->addSql('DROP INDEX Deleted ON unsubscribes');
$this->addSql('ALTER TABLE user CHANGE username username VARCHAR(180) NOT NULL, CHANGE password password VARCHAR(255) NOT NULL, CHANGE totpSecret totpSecret VARCHAR(255) DEFAULT NULL, CHANGE remark remark VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE messenger_messages CHANGE body body LONGTEXT NOT NULL, CHANGE headers headers LONGTEXT NOT NULL, CHANGE queue_name queue_name VARCHAR(190) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE phone_number_unsubscribes');
$this->addSql('ALTER TABLE log CHANGE id id INT UNSIGNED AUTO_INCREMENT NOT NULL, CHANGE message message TEXT DEFAULT NULL, CHANGE context context TEXT DEFAULT NULL, CHANGE level level SMALLINT DEFAULT NULL, CHANGE extra extra TEXT DEFAULT NULL');
$this->addSql('ALTER TABLE messenger_messages CHANGE body body LONGTEXT NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE headers headers LONGTEXT NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE queue_name queue_name VARCHAR(190) NOT NULL COLLATE `utf8mb4_unicode_ci`');
// $this->addSql('ALTER TABLE unsubscribes DROP INDEX UNIQ_FC138E3C459EC945, ADD INDEX RecipientEmail (RecipientEmail)');
$this->addSql('CREATE INDEX Deleted ON unsubscribes (Deleted)');
$this->addSql('ALTER TABLE user CHANGE username username VARCHAR(180) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE password password VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE totpSecret totpSecret VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE remark remark VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
}
}