<?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 Version20230706093340 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 activite_deal (id INT AUTO_INCREMENT NOT NULL, installateur_id INT DEFAULT NULL, equipe_id INT DEFAULT NULL, fonction VARCHAR(255) DEFAULT NULL, commentaire VARCHAR(255) DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_942ED86451262FCB (installateur_id), INDEX IDX_942ED8646D861B89 (equipe_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE activite_dossier (id INT AUTO_INCREMENT NOT NULL, installateur_id INT DEFAULT NULL, equipe_id INT DEFAULT NULL, fonction VARCHAR(255) DEFAULT NULL, commentaire VARCHAR(255) DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_77EE27B251262FCB (installateur_id), INDEX IDX_77EE27B26D861B89 (equipe_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE activite_deal ADD CONSTRAINT FK_942ED86451262FCB FOREIGN KEY (installateur_id) REFERENCES installateur (id)');
$this->addSql('ALTER TABLE activite_deal ADD CONSTRAINT FK_942ED8646D861B89 FOREIGN KEY (equipe_id) REFERENCES equipe (id)');
$this->addSql('ALTER TABLE activite_dossier ADD CONSTRAINT FK_77EE27B251262FCB FOREIGN KEY (installateur_id) REFERENCES installateur (id)');
$this->addSql('ALTER TABLE activite_dossier ADD CONSTRAINT FK_77EE27B26D861B89 FOREIGN KEY (equipe_id) REFERENCES equipe (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE activite_deal');
$this->addSql('DROP TABLE activite_dossier');
}
}