<?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 Version20220128085154 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('CREATE TABLE parking_slot_history (id INT AUTO_INCREMENT NOT NULL, parking_slot_id INT NOT NULL, parking_type_id INT DEFAULT NULL, parking_map_id INT NOT NULL, company_id INT DEFAULT NULL, code VARCHAR(32) DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, created_at DATETIME DEFAULT NULL, updated_at DATETIME DEFAULT NULL, is_active TINYINT(1) NOT NULL, INDEX IDX_485EABECD70FE946 (parking_slot_id), INDEX IDX_485EABEC4BA67449 (parking_type_id), INDEX IDX_485EABEC7D27CF9 (parking_map_id), INDEX IDX_485EABEC979B1AD6 (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE parking_slot_history ADD CONSTRAINT FK_485EABECD70FE946 FOREIGN KEY (parking_slot_id) REFERENCES parkingslot (id)');
$this->addSql('ALTER TABLE parking_slot_history ADD CONSTRAINT FK_485EABEC4BA67449 FOREIGN KEY (parking_type_id) REFERENCES parkingtype (id)');
$this->addSql('ALTER TABLE parking_slot_history ADD CONSTRAINT FK_485EABEC7D27CF9 FOREIGN KEY (parking_map_id) REFERENCES parkingmap (id)');
$this->addSql('ALTER TABLE parking_slot_history ADD CONSTRAINT FK_485EABEC979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE parking_slot_history');
}
}