<?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 Version20210807232548 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE ebooking ADD gift_recipient_id INT DEFAULT NULL, ADD gift_message LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE ebooking ADD CONSTRAINT FK_8049431651A55FBD FOREIGN KEY (gift_recipient_id) REFERENCES customer (id)');
$this->addSql('CREATE INDEX IDX_8049431651A55FBD ON ebooking (gift_recipient_id)');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE ebooking DROP FOREIGN KEY FK_8049431651A55FBD');
$this->addSql('DROP INDEX IDX_8049431651A55FBD ON ebooking');
$this->addSql('ALTER TABLE ebooking DROP gift_recipient_id, DROP gift_message');
}
}