migrations/Version20221020130817.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;/*** Auto-generated Migration: Please modify to your needs!*/final class Version20221020130817 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 messagerie_locataire (messagerie_id INT NOT NULL, locataire_id INT NOT NULL, INDEX IDX_B5948B61836C1031 (messagerie_id), INDEX IDX_B5948B61D8A38199 (locataire_id), PRIMARY KEY(messagerie_id, locataire_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');$this->addSql('ALTER TABLE messagerie_locataire ADD CONSTRAINT FK_B5948B61836C1031 FOREIGN KEY (messagerie_id) REFERENCES messagerie (id) ON DELETE CASCADE');$this->addSql('ALTER TABLE messagerie_locataire ADD CONSTRAINT FK_B5948B61D8A38199 FOREIGN KEY (locataire_id) REFERENCES locataire (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 messagerie_locataire');}}