addSql('ALTER TABLE users_organizations ADD role_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE users_organizations ADD CONSTRAINT FK_4B991472D60322AC FOREIGN KEY (role_id) REFERENCES roles (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('CREATE INDEX IDX_4B991472D60322AC ON users_organizations (role_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 users_organizations DROP CONSTRAINT FK_4B991472D60322AC'); $this->addSql('DROP INDEX IDX_4B991472D60322AC'); $this->addSql('ALTER TABLE users_organizations DROP role_id'); } }