<?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 Version20220505122120 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 product_calendar_expiration (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, product_id INT NOT NULL, isActive TINYINT(1) DEFAULT NULL, date DATETIME NOT NULL, update_at DATETIME NOT NULL, expired_date DATETIME NOT NULL, status TINYINT(1) NOT NULL, INDEX IDX_EBC67FDAB03A8386 (created_by_id), INDEX IDX_EBC67FDA896DBBDE (updated_by_id), INDEX IDX_EBC67FDA4584665A (product_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE product_calendar_expiration ADD CONSTRAINT FK_EBC67FDAB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE product_calendar_expiration ADD CONSTRAINT FK_EBC67FDA896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE product_calendar_expiration ADD CONSTRAINT FK_EBC67FDA4584665A FOREIGN KEY (product_id) REFERENCES product (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE product_calendar_expiration');
}
}