addSql(<<<'SQL' CREATE TABLE chill_event_thirdparty (event_id INT NOT NULL, thirdparty_id INT NOT NULL, PRIMARY KEY(event_id, thirdparty_id)) SQL); $this->addSql(<<<'SQL' CREATE INDEX IDX_9946573E71F7E88B ON chill_event_thirdparty (event_id) SQL); $this->addSql(<<<'SQL' CREATE INDEX IDX_9946573EC7D3A8E6 ON chill_event_thirdparty (thirdparty_id) SQL); $this->addSql(<<<'SQL' ALTER TABLE chill_event_thirdparty ADD CONSTRAINT FK_9946573E71F7E88B FOREIGN KEY (event_id) REFERENCES chill_event_event (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE SQL); $this->addSql(<<<'SQL' ALTER TABLE chill_event_thirdparty ADD CONSTRAINT FK_9946573EC7D3A8E6 FOREIGN KEY (thirdparty_id) REFERENCES chill_3party.third_party (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE SQL); $this->addSql(<<<'SQL' ALTER TABLE chill_event_event DROP organizationcost SQL); } public function down(Schema $schema): void { $this->addSql(<<<'SQL' ALTER TABLE chill_event_thirdparty DROP CONSTRAINT FK_9946573E71F7E88B SQL); $this->addSql(<<<'SQL' ALTER TABLE chill_event_thirdparty DROP CONSTRAINT FK_9946573EC7D3A8E6 SQL); $this->addSql(<<<'SQL' DROP TABLE chill_event_thirdparty SQL); $this->addSql(<<<'SQL' ALTER TABLE chill_event_event ADD organizationcost NUMERIC(10, 4) DEFAULT '0.0' SQL); } }