<?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 Version20211017145929 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_history (id INT AUTO_INCREMENT NOT NULL, pd_order_id INT DEFAULT NULL, date DATETIME NOT NULL, type INT NOT NULL, INDEX IDX_D1C0D9008FF7BE3 (pd_order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE order_history ADD CONSTRAINT FK_D1C0D9008FF7BE3 FOREIGN KEY (pd_order_id) REFERENCES `order` (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE order_history');
}
}