<?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 Version20220602081654 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('ALTER TABLE orders ADD type_id INT DEFAULT NULL, ADD sender_name VARCHAR(100) NOT NULL, ADD sender_zip VARCHAR(100) NOT NULL, ADD sender_addr VARCHAR(100) NOT NULL, ADD sender_tel VARCHAR(100) NOT NULL, ADD sender_fax VARCHAR(100) NOT NULL');
$this->addSql('ALTER TABLE orders ADD CONSTRAINT FK_E52FFDEEC54C8C93 FOREIGN KEY (type_id) REFERENCES type (id)');
$this->addSql('CREATE INDEX IDX_E52FFDEEC54C8C93 ON orders (type_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE orders DROP FOREIGN KEY FK_E52FFDEEC54C8C93');
$this->addSql('DROP INDEX IDX_E52FFDEEC54C8C93 ON orders');
$this->addSql('ALTER TABLE orders DROP type_id, DROP sender_name, DROP sender_zip, DROP sender_addr, DROP sender_tel, DROP sender_fax');
}
}