<?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 Version20220214091021 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 order_state_id INT DEFAULT NULL, ADD order_step_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE rental ADD CONSTRAINT FK_1619C27DE420DE70 FOREIGN KEY (order_state_id) REFERENCES order_state (id)');
$this->addSql('ALTER TABLE rental ADD CONSTRAINT FK_1619C27D85C8B7D7 FOREIGN KEY (order_step_id) REFERENCES order_step (id)');
$this->addSql('CREATE INDEX IDX_1619C27DE420DE70 ON rental (order_state_id)');
$this->addSql('CREATE INDEX IDX_1619C27D85C8B7D7 ON rental (order_step_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_1619C27DE420DE70');
$this->addSql('ALTER TABLE rental DROP FOREIGN KEY FK_1619C27D85C8B7D7');
$this->addSql('DROP INDEX IDX_1619C27DE420DE70 ON rental');
$this->addSql('DROP INDEX IDX_1619C27D85C8B7D7 ON rental');
$this->addSql('ALTER TABLE rental DROP order_state_id, DROP order_step_id');
}
}