<?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 Version20211212155019 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 meeting (id INT AUTO_INCREMENT NOT NULL, instance_id INT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, deleted_by_id INT DEFAULT NULL, saas_id INT DEFAULT NULL, description LONGTEXT DEFAULT NULL, is_all_day TINYINT(1) NOT NULL, createdAt DATETIME DEFAULT NULL, updatedAt DATETIME DEFAULT NULL, deletedAt DATETIME DEFAULT NULL, started_at DATE DEFAULT NULL, ended_at DATE DEFAULT NULL, INDEX IDX_F515E1393A51721D (instance_id), INDEX IDX_F515E139B03A8386 (created_by_id), INDEX IDX_F515E139896DBBDE (updated_by_id), INDEX IDX_F515E139C76F1F52 (deleted_by_id), INDEX IDX_F515E139C79C849A (saas_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE meeting ADD CONSTRAINT FK_F515E1393A51721D FOREIGN KEY (instance_id) REFERENCES instance (id)');
$this->addSql('ALTER TABLE meeting ADD CONSTRAINT FK_F515E139B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE meeting ADD CONSTRAINT FK_F515E139896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE meeting ADD CONSTRAINT FK_F515E139C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE meeting ADD CONSTRAINT FK_F515E139C79C849A FOREIGN KEY (saas_id) REFERENCES saas (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE meeting');
}
}