<?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 Version20220210134430 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 rental ADD customer_id INT DEFAULT NULL, ADD delivery_date DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', ADD new_hire TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE rental ADD CONSTRAINT FK_1619C27D9395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (id)');
$this->addSql('CREATE INDEX IDX_1619C27D9395C3F3 ON rental (customer_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE rental DROP FOREIGN KEY FK_1619C27D9395C3F3');
$this->addSql('DROP INDEX IDX_1619C27D9395C3F3 ON rental');
$this->addSql('ALTER TABLE rental DROP customer_id, DROP delivery_date, DROP new_hire');
}
}