migrations/Version20251102121337.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 Version20251102121337 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("CREATE TABLE `registration_billing_detail` (
  19.                                   `id` int NOT NULL AUTO_INCREMENT,
  20.                                   `registration_id` int NOT NULL,
  21.                                   `billing_category_id` int NOT NULL,
  22.                                   `billing_invoice_month` varchar(7) NOT NULL,
  23.                                   `cheshbon_for` varchar(45) NOT NULL,
  24.                                   `billing_date` datetime NOT NULL,
  25.                                   `exam_vendor_id` int NOT NULL,
  26.                                   `exam_credits` int NOT NULL,
  27.                                   `exam_additional_charge` float NOT NULL,
  28.                                   `billing_category_credits` int NOT NULL,
  29.                                   `rate_per_credit` decimal(8,2) NOT NULL,
  30.                                   `charge_additional_grading_fee` tinyint(1) NOT NULL,
  31.                                   `credits_fee` decimal(8,2) NOT NULL,
  32.                                   `grading_fee` decimal(8,2) NOT NULL,
  33.                                   `processing_fee` decimal(8,2) NOT NULL,
  34.                                   `info_allpackages` varchar(255) NOT NULL,
  35.                                   `info_seminarystudent` varchar(255) NOT NULL,
  36.                                   `create_date` datetime NOT NULL,
  37.                                   PRIMARY KEY (`id`),
  38.                                   UNIQUE (`registration_id`,`billing_category_id`),
  39.                                   FOREIGN KEY (`registration_id`) REFERENCES registrations(`id`),
  40.                                   FOREIGN KEY (`billing_category_id`) REFERENCES billing_categories(`id`),
  41.                                   FOREIGN KEY (`exam_vendor_id`) REFERENCES vendors(`id`)
  42.                                 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ");
  43.     }
  44.     public function down(Schema $schema): void
  45.     {
  46.         // this down() migration is auto-generated, please modify it to your needs
  47.         $this->addSql("DROP TABLE registration_billing_detail");
  48.     }
  49. }