<?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 Version20221205112952 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('ALTER TABLE adherent DROP FOREIGN KEY FK_90D3F060D0B364B6'); $this->addSql('ALTER TABLE adherent ADD CONSTRAINT FK_90D3F060D0B364B6 FOREIGN KEY (profildecotisation_id) REFERENCES profildecotisation (id) ON DELETE SET NULL'); $this->addSql('ALTER TABLE prestataire CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\''); $this->addSql('DROP INDEX UNIQ_386FBA47989D9B62 ON profildecotisation'); $this->addSql('ALTER TABLE profildecotisation DROP name, DROP slug, DROP content, DROP enabled, CHANGE maxpercevablemensuel montant INT NOT NULL'); } public function down(Schema $schema) : void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE adherent DROP FOREIGN KEY FK_90D3F060D0B364B6'); $this->addSql('ALTER TABLE adherent ADD CONSTRAINT FK_90D3F060D0B364B6 FOREIGN KEY (profildecotisation_id) REFERENCES profildecotisation (id)'); $this->addSql('ALTER TABLE prestataire CHANGE iban iban LONGTEXT CHARACTER SET utf8mb3 DEFAULT NULL COLLATE `utf8mb3_general_ci` COMMENT \'(DC2Type:personal_data)\''); $this->addSql('ALTER TABLE profildecotisation ADD name VARCHAR(150) CHARACTER SET utf8mb3 NOT NULL COLLATE `utf8mb3_general_ci`, ADD slug VARCHAR(150) CHARACTER SET utf8mb3 NOT NULL COLLATE `utf8mb3_general_ci`, ADD content LONGTEXT CHARACTER SET utf8mb3 DEFAULT NULL COLLATE `utf8mb3_general_ci`, ADD enabled TINYINT(1) NOT NULL, CHANGE montant maxPercevableMensuel INT NOT NULL'); $this->addSql('CREATE UNIQUE INDEX UNIQ_386FBA47989D9B62 ON profildecotisation (slug)'); } }