<?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 Version20220408100510 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 order_reminder (id INT AUTO_INCREMENT NOT NULL, product_id INT NOT NULL, product_variant_id INT DEFAULT NULL, order_saved TINYINT(1) DEFAULT 0 NOT NULL, first_name VARCHAR(255) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, sent TINYINT(1) DEFAULT 0 NOT NULL, hash VARCHAR(255) NOT NULL, locale VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, INDEX IDX_A1CFADF14584665A (product_id), INDEX IDX_A1CFADF1A80EF684 (product_variant_id), INDEX hash_idx (hash), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE order_reminder ADD CONSTRAINT FK_A1CFADF14584665A FOREIGN KEY (product_id) REFERENCES product (id)');
$this->addSql('ALTER TABLE order_reminder ADD CONSTRAINT FK_A1CFADF1A80EF684 FOREIGN KEY (product_variant_id) REFERENCES product_variant (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE order_reminder');
}
}