<?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 Version20230518135322 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 office_switcher (id INT AUTO_INCREMENT NOT NULL, professional_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', office_id INT NOT NULL, position INT NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_1CEB8E7ADB77003 (professional_id), INDEX IDX_1CEB8E7AFFA0C224 (office_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE office_switcher ADD CONSTRAINT FK_1CEB8E7ADB77003 FOREIGN KEY (professional_id) REFERENCES `professional` (id)');
$this->addSql('ALTER TABLE office_switcher ADD CONSTRAINT FK_1CEB8E7AFFA0C224 FOREIGN KEY (office_id) REFERENCES `office` (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE office_switcher');
}
}