addSql('ALTER TABLE merchant DROP FOREIGN KEY FK_74AB25E1E511F091'); $this->addSql('CREATE TABLE opening (id INT AUTO_INCREMENT NOT NULL, section_id INT NOT NULL, day INT NOT NULL, time_start TIME DEFAULT NULL, time_end TIME DEFAULT NULL, INDEX IDX_E35D4C3D823E37A (section_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('ALTER TABLE opening ADD CONSTRAINT FK_E35D4C3D823E37A FOREIGN KEY (section_id) REFERENCES section (id)'); $this->addSql('DROP TABLE credit_config'); $this->addSql('DROP TABLE point_sale_day_info'); $this->addSql('DROP INDEX UNIQ_74AB25E1E511F091 ON merchant'); $this->addSql('ALTER TABLE merchant DROP credit_config_id'); $this->addSql('ALTER TABLE order_shop ADD cycle_id INT DEFAULT NULL'); } public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs $this->addSql('CREATE TABLE credit_config (id INT AUTO_INCREMENT NOT NULL, active TINYINT(1) NOT NULL, limit_amount DOUBLE PRECISION DEFAULT NULL, limit_reminder DOUBLE PRECISION DEFAULT NULL, behavior VARCHAR(31) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, process_order_checked_default TINYINT(1) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' '); $this->addSql('CREATE TABLE point_sale_day_info (id INT AUTO_INCREMENT NOT NULL, point_sale_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, active TINYINT(1) NOT NULL, day SMALLINT NOT NULL, description LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, dev_alias VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_34BC1A33896DBBDE (updated_by_id), INDEX IDX_34BC1A33FDAAB1A4 (point_sale_id), INDEX IDX_34BC1A33B03A8386 (created_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' '); $this->addSql('ALTER TABLE point_sale_day_info ADD CONSTRAINT FK_34BC1A33896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)'); $this->addSql('ALTER TABLE point_sale_day_info ADD CONSTRAINT FK_34BC1A33B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)'); $this->addSql('ALTER TABLE point_sale_day_info ADD CONSTRAINT FK_34BC1A33FDAAB1A4 FOREIGN KEY (point_sale_id) REFERENCES point_sale (id)'); $this->addSql('DROP TABLE opening'); $this->addSql('ALTER TABLE merchant ADD credit_config_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE merchant ADD CONSTRAINT FK_74AB25E1E511F091 FOREIGN KEY (credit_config_id) REFERENCES credit_config (id)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_74AB25E1E511F091 ON merchant (credit_config_id)'); $this->addSql('ALTER TABLE order_shop DROP cycle_id'); } }