<?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 Version20210712115206 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 reservation_alert (id INT AUTO_INCREMENT NOT NULL, resolved_by_id INT DEFAULT NULL, parking_slot_id INT DEFAULT NULL, type VARCHAR(40) NOT NULL, is_resolved TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_548296666713A32B (resolved_by_id), INDEX IDX_54829666D70FE946 (parking_slot_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE reservation_alert ADD CONSTRAINT FK_548296666713A32B FOREIGN KEY (resolved_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE reservation_alert ADD CONSTRAINT FK_54829666D70FE946 FOREIGN KEY (parking_slot_id) REFERENCES parkingslot (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE reservation_alert');
}
}