<?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 Version20231130173350 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 collaborator_project (id INT AUTO_INCREMENT NOT NULL, collaborator_id INT DEFAULT NULL, project_id INT DEFAULT NULL, INDEX IDX_FAB8E59B30098C8C (collaborator_id), INDEX IDX_FAB8E59B166D1F9C (project_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE collaborator_project ADD CONSTRAINT FK_FAB8E59B30098C8C FOREIGN KEY (collaborator_id) REFERENCES collaborator (id)');
$this->addSql('ALTER TABLE collaborator_project ADD CONSTRAINT FK_FAB8E59B166D1F9C FOREIGN KEY (project_id) REFERENCES project (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE collaborator_project DROP FOREIGN KEY FK_FAB8E59B30098C8C');
$this->addSql('ALTER TABLE collaborator_project DROP FOREIGN KEY FK_FAB8E59B166D1F9C');
$this->addSql('DROP TABLE collaborator_project');
}
}