migrations/Version20211209092614.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 Version20211209092614 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.                             PRIMARY KEY (`id`));");
  22.         $this->addSql("INSERT INTO `chargeTypes` (`id`, `description`) VALUES ('1', 'Registration charge');
  23.                             INSERT INTO `chargeTypes` (`id`, `description`) VALUES ('2', 'Package purchase');
  24.                             INSERT INTO `chargeTypes` (`id`, `description`) VALUES ('3', 'Proctor fee')");
  25.     }
  26.     public function down(Schema $schema): void
  27.     {
  28.         $this->addSql('DELETE FROM chargeTypes WHERE id in (1,2,3)');
  29.     }
  30. }