<?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 Version20240328231602 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 facturier_professional (id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE facturier_professional_professional (facturier_professional_id INT NOT NULL, professional_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', INDEX IDX_DA26FF782C366E38 (facturier_professional_id), INDEX IDX_DA26FF78DB77003 (professional_id), PRIMARY KEY(facturier_professional_id, professional_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE facturier_professional_professional ADD CONSTRAINT FK_DA26FF782C366E38 FOREIGN KEY (facturier_professional_id) REFERENCES facturier_professional (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE facturier_professional_professional ADD CONSTRAINT FK_DA26FF78DB77003 FOREIGN KEY (professional_id) REFERENCES `professional` (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE facturier_professional_professional DROP FOREIGN KEY FK_DA26FF782C366E38');
$this->addSql('DROP TABLE facturier_professional');
$this->addSql('DROP TABLE facturier_professional_professional');
}
}