migrations/Version20250528185244.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 Version20250528185244 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_student_contact (id INT AUTO_INCREMENT NOT NULL, registration_student_registration_id INT DEFAULT NULL, establishment_id INT DEFAULT NULL, phone VARCHAR(30) DEFAULT NULL, name VARCHAR(60) DEFAULT NULL, subject VARCHAR(128) DEFAULT NULL, message LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', created_by INT NOT NULL, updated_by INT NOT NULL, INDEX IDX_2416FDF6B0396129 (registration_student_registration_id), INDEX IDX_2416FDF68565851 (establishment_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql('ALTER TABLE registration_student_contact ADD CONSTRAINT FK_2416FDF6B0396129 FOREIGN KEY (registration_student_registration_id) REFERENCES registration_student_registration (id)');
  20.         $this->addSql('ALTER TABLE registration_student_contact ADD CONSTRAINT FK_2416FDF68565851 FOREIGN KEY (establishment_id) REFERENCES establishment (id)');
  21.         $this->addSql('ALTER TABLE mobile_parent_app_account ADD device_token VARCHAR(255) DEFAULT NULL');
  22.         $this->addSql('ALTER TABLE registration_diet ADD is_actived TINYINT(1) NOT NULL');
  23.     }
  24.     public function down(Schema $schema): void
  25.     {
  26.         // this down() migration is auto-generated, please modify it to your needs
  27.         $this->addSql('DROP TABLE registration_student_contact');
  28.         $this->addSql('ALTER TABLE mobile_parent_app_account DROP device_token');
  29.         $this->addSql('ALTER TABLE registration_diet DROP is_actived');
  30.     }
  31. }