<?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 Version20210707094225 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 camera ADD parking_map_id INT NOT NULL, ADD coords VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE camera ADD CONSTRAINT FK_3B1CEE057D27CF9 FOREIGN KEY (parking_map_id) REFERENCES parkingmap (id)');
$this->addSql('CREATE INDEX IDX_3B1CEE057D27CF9 ON camera (parking_map_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE camera DROP FOREIGN KEY FK_3B1CEE057D27CF9');
$this->addSql('DROP INDEX IDX_3B1CEE057D27CF9 ON camera');
$this->addSql('ALTER TABLE camera DROP parking_map_id, DROP coords');
}
}