<?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 Version20210916113651 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 car ADD fixed_parking_slot_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE car ADD CONSTRAINT FK_773DE69D377495B7 FOREIGN KEY (fixed_parking_slot_id) REFERENCES parkingslot (id)');
$this->addSql('CREATE INDEX IDX_773DE69D377495B7 ON car (fixed_parking_slot_id)');
$this->addSql('ALTER TABLE user CHANGE authtype_id authtype_id INT DEFAULT 1');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE car DROP FOREIGN KEY FK_773DE69D377495B7');
$this->addSql('DROP INDEX IDX_773DE69D377495B7 ON car');
$this->addSql('ALTER TABLE car DROP fixed_parking_slot_id');
$this->addSql('ALTER TABLE user CHANGE authtype_id authtype_id INT DEFAULT 1');
}
}