migrations/Version20251106083409.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7. * Auto-generated Migration: Please modify to your needs!
  8. */
  9. final class Version20251106083409 extends AbstractMigration
  10. {
  11. public function getDescription(): string
  12. {
  13. return '';
  14. }
  15. public function up(Schema $schema): void
  16. {
  17. // this up() migration is auto-generated, please modify it to your needs
  18. $this->addSql("alter table registration_billing_detail add column `total` decimal(8,2) NOT NULL after processing_fee;");
  19. $this->addSql("alter table registration_billing_detail modify column `create_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP;");
  20. $this->addSql("ALTER TABLE `billing_category_rates`
  21. DROP FOREIGN KEY `billing_category_rates_ibfk_1`;
  22. ALTER TABLE `billing_category_rates`
  23. DROP INDEX `billing_category_id` ;");
  24. $this->addSql("alter table billing_category_rates change column date_time start_date date not null;");
  25. $this->addSql("alter table billing_category_rates add column `end_date` date;");
  26. }
  27. public function down(Schema $schema): void
  28. {
  29. // this down() migration is auto-generated, please modify it to your needs
  30. $this->addSql("alter table registration_billing_detail DROP column `total`;");
  31. $this->addSql("alter table registration_billing_detail modify column `create_date` DATETIME NOT NULL;");
  32. $this->addSql("alter table billing_category_rates change column start_date date_time date not null;");
  33. $this->addSql("alter table billing_category_rates drop column `end_date`;");
  34. }
  35. }