migrations/Version20220223200029.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 Version20220223200029 extends AbstractMigration
  10. {
  11. public function getDescription(): string
  12. {
  13. return '';
  14. }
  15. public function up(Schema $schema): void
  16. {
  17. $this->addSql("DROP TABLE IF EXISTS chargeTypes");
  18. $this->addSql("CREATE TABLE `chargeTypes` (
  19. `id` INT NOT NULL AUTO_INCREMENT,
  20. `description` VARCHAR(50) NOT NULL,
  21. `additional_fee_included` TINYINT NULL,
  22. PRIMARY KEY (`id`));");
  23. $this->addSql("INSERT INTO `chargeTypes` (`id`, `description`,`additional_fee_included`) VALUES ('1', 'Registration charge','1');
  24. INSERT INTO `chargeTypes` (`id`, `description`) VALUES ('2', 'Package purchase');
  25. INSERT INTO `chargeTypes` (`id`, `description`) VALUES ('3', 'Proctor fee');
  26. INSERT INTO `chargeTypes` (`id`, `description`,`additional_fee_included`) VALUES ('4', 'Additional fee','1');
  27. INSERT INTO `chargeTypes` (`id`, `description`,`additional_fee_included`) VALUES ('5', 'Proctor fee and additional fee','1');");
  28. }
  29. public function down(Schema $schema): void
  30. {
  31. // this down() migration is auto-generated, please modify it to your needs
  32. $this->addSql('DELETE FROM chargeTypes WHERE id in (1,2,3,4,5)');
  33. }
  34. }