<?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 Version20211019165017 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 secret_key (id INT AUTO_INCREMENT NOT NULL, pd_order_id INT DEFAULT NULL, secret VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_7F4741F58FF7BE3 (pd_order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE secret_key ADD CONSTRAINT FK_7F4741F58FF7BE3 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 secret_key');
}
}