addSql('ALTER TABLE announcement DROP CONSTRAINT fk_4db9d91c6bf700bd'); $this->addSql('DROP INDEX idx_4db9d91c6bf700bd'); $this->addSql('ALTER TABLE announcement ADD status VARCHAR(255) NOT NULL'); $this->addSql('ALTER TABLE announcement DROP status_id'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('CREATE SCHEMA public'); $this->addSql('ALTER TABLE announcement ADD status_id INT NOT NULL'); $this->addSql('ALTER TABLE announcement DROP status'); $this->addSql('ALTER TABLE announcement ADD CONSTRAINT fk_4db9d91c6bf700bd FOREIGN KEY (status_id) REFERENCES status (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('CREATE INDEX idx_4db9d91c6bf700bd ON announcement (status_id)'); } }