addSql('CREATE TABLE members_cotisations (id SERIAL NOT NULL, members_id INT DEFAULT NULL, startd_ate TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, end_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, amount DOUBLE PRECISION DEFAULT NULL, is_paid BOOLEAN NOT NULL, PRIMARY KEY(id))'); $this->addSql('CREATE INDEX IDX_C7D1EB64BD01F5ED ON members_cotisations (members_id)'); $this->addSql('COMMENT ON COLUMN members_cotisations.startd_ate IS \'(DC2Type:datetime_immutable)\''); $this->addSql('COMMENT ON COLUMN members_cotisations.end_date IS \'(DC2Type:datetime_immutable)\''); $this->addSql('ALTER TABLE members_cotisations ADD CONSTRAINT FK_C7D1EB64BD01F5ED FOREIGN KEY (members_id) REFERENCES members (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); } 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 members_cotisations DROP CONSTRAINT FK_C7D1EB64BD01F5ED'); $this->addSql('DROP TABLE members_cotisations'); } }