migrations/Version20230227094809.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 Version20230227094809 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->abortIf(
  19.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  20.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  21.         );
  22.         $this->addSql('CREATE TABLE academic_term (id INT AUTO_INCREMENT NOT NULL, term_id_id INT NOT NULL, hei_id INT NOT NULL, academic_year_id VARCHAR(9) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, display_name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, start_date DATE NOT NULL, end_date DATE NOT NULL, INDEX IDX_39D7739BDB997002 (hei_id), UNIQUE INDEX UNIQ_39D7739B4A76E1DF (term_id_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  23.         $this->abortIf(
  24.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  25.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  26.         );
  27.         $this->addSql('CREATE TABLE contact_detail (id INT AUTO_INCREMENT NOT NULL, given_names VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, family_names VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, email VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, phone_number VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  28.         $this->abortIf(
  29.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  30.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  31.         );
  32.         $this->addSql('CREATE TABLE course (id INT AUTO_INCREMENT NOT NULL, sending_learning_agreement_id INT DEFAULT NULL, receiving_learning_agreement_id INT DEFAULT NULL, los_id VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, loi_id VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, title VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, credits DOUBLE PRECISION DEFAULT NULL, recognition_conditions LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, short_description LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, los_code VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, credit_scheme VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, originating_from_learning_agreement TINYINT(1) NOT NULL, recognition_credits DOUBLE PRECISION DEFAULT NULL, INDEX IDX_169E6FB9A4986B18 (receiving_learning_agreement_id), INDEX IDX_169E6FB9E21F406E (sending_learning_agreement_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  33.         $this->abortIf(
  34.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  35.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  36.         );
  37.         $this->addSql('CREATE TABLE course_grade (id INT AUTO_INCREMENT NOT NULL, course_id INT NOT NULL, transcript_of_records_id INT NOT NULL, grade VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, passed TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, updated_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_B0F1A9DC3F5F0073 (transcript_of_records_id), UNIQUE INDEX UNIQ_B0F1A9DC591CC992 (course_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  38.         $this->abortIf(
  39.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  40.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  41.         );
  42.         $this->addSql('CREATE TABLE ext_log_entries (id INT AUTO_INCREMENT NOT NULL, action VARCHAR(8) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, logged_at DATETIME NOT NULL, object_id VARCHAR(64) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, object_class VARCHAR(191) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, version INT NOT NULL, data LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:array)\', username VARCHAR(191) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, INDEX log_date_lookup_idx (logged_at), INDEX log_version_lookup_idx (object_id, object_class, version), INDEX log_class_lookup_idx (object_class), INDEX log_user_lookup_idx (username), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  43.         $this->abortIf(
  44.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  45.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  46.         );
  47.         $this->addSql('CREATE TABLE ext_translations (id INT AUTO_INCREMENT NOT NULL, locale VARCHAR(8) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, object_class VARCHAR(191) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, field VARCHAR(32) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, foreign_key VARCHAR(64) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, content LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, INDEX general_translations_lookup_idx (object_class, foreign_key), UNIQUE INDEX lookup_unique_idx (locale, object_class, field, foreign_key), INDEX translations_lookup_idx (locale, object_class, foreign_key), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  48.         $this->abortIf(
  49.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  50.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  51.         );
  52.         $this->addSql('CREATE TABLE hei (id INT AUTO_INCREMENT NOT NULL, default_mobility_contact_details_id INT DEFAULT NULL, name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, schac_code VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, website VARCHAR(253) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, default_laprovisions_if_incomplete_url VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, default_lalearning_outcomes_url_as_receiving VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, default_mobility_isced_fcode VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, default_mobility_isced_clarification VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, default_mobility_eqf_level_at_departure INT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, updated_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, country VARCHAR(2) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, credits_for_graduation JSON NOT NULL, UNIQUE INDEX UNIQ_9561059428C50F92 (default_mobility_contact_details_id), UNIQUE INDEX UNIQ_95610594D7A7DDB9 (schac_code), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  53.         $this->abortIf(
  54.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  55.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  56.         );
  57.         $this->addSql('CREATE TABLE language_level (id INT AUTO_INCREMENT NOT NULL, student_id INT NOT NULL, language VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, level VARCHAR(2) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_E5B2C842CB944F1A (student_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  58.         $this->abortIf(
  59.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  60.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  61.         );
  62.         $this->addSql('CREATE TABLE learning_agreement (id INT AUTO_INCREMENT NOT NULL, mobility_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', student_id INT NOT NULL, receiving_hei_learning_outcomes_url VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, provisions_if_incomplete_url VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, status VARCHAR(30) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, pdf VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, updated_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, rejection_sending_comment LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, rejection_receiving_comment LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, student_state JSON NOT NULL, mobility_state JSON NOT NULL, INDEX IDX_D44E1743CB944F1A (student_id), UNIQUE INDEX UNIQ_D44E17438D92EAA4 (mobility_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  63.         $this->abortIf(
  64.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  65.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  66.         );
  67.         $this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, headers LONGTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, queue_name VARCHAR(190) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, available_at DATETIME NOT NULL, delivered_at DATETIME DEFAULT NULL, INDEX IDX_75EA56E0E3BD61CE (available_at), INDEX IDX_75EA56E0FB7336F0 (queue_name), INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  68.         $this->abortIf(
  69.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  70.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  71.         );
  72.         $this->addSql('CREATE TABLE mobility (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', sending_hei_id INT NOT NULL, receiving_hei_id INT NOT NULL, sending_ounit_id INT DEFAULT NULL, receiving_ounit_id INT DEFAULT NULL, student_id INT NOT NULL, sending_hei_contact_person_id INT NOT NULL, receiving_hei_contact_person_id INT NOT NULL, start_date DATE NOT NULL, end_date DATE NOT NULL, receiving_hei_academic_year VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, eqf_level_at_departure INT NOT NULL, isced_fcode VARCHAR(4) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, isced_clarification VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, updated_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, credits_recognition_pdf VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, UNIQUE INDEX UNIQ_D650201C764817C2 (receiving_hei_contact_person_id), INDEX IDX_D650201C5973BF00 (receiving_hei_id), INDEX IDX_D650201C30D5FD44 (receiving_ounit_id), UNIQUE INDEX UNIQ_D650201C30CF3CB4 (sending_hei_contact_person_id), INDEX IDX_D650201CA9BC4869 (sending_hei_id), INDEX IDX_D650201CA733BADA (sending_ounit_id), INDEX IDX_D650201CCB944F1A (student_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  73.         $this->abortIf(
  74.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  75.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  76.         );
  77.         $this->addSql('CREATE TABLE notification (id INT AUTO_INCREMENT NOT NULL, sent_at DATETIME NOT NULL, type VARCHAR(60) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, data JSON NOT NULL, subject VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  78.         $this->abortIf(
  79.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  80.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  81.         );
  82.         $this->addSql('CREATE TABLE notification_receipt (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, notification_id INT NOT NULL, read_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_46873CF2EF1A9D84 (notification_id), INDEX IDX_46873CF2A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  83.         $this->abortIf(
  84.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  85.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  86.         );
  87.         $this->addSql('CREATE TABLE ounit (id INT AUTO_INCREMENT NOT NULL, hei_id INT NOT NULL, name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, updated_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_20BFC4CEDB997002 (hei_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  88.         $this->abortIf(
  89.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  90.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  91.         );
  92.         $this->addSql('CREATE TABLE signature (id INT AUTO_INCREMENT NOT NULL, signer_name VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, signer_position VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, signer_email VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, timestamp DATETIME NOT NULL, signer_app VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  93.         $this->abortIf(
  94.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  95.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  96.         );
  97.         $this->addSql('CREATE TABLE staff (id INT AUTO_INCREMENT NOT NULL, contact_details_id INT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, updated_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, UNIQUE INDEX UNIQ_426EF3927CA35EB5 (contact_details_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  98.         $this->abortIf(
  99.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  100.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  101.         );
  102.         $this->addSql('CREATE TABLE staff_hei (staff_id INT NOT NULL, hei_id INT NOT NULL, INDEX IDX_1B6D9E5DD4D57CD (staff_id), INDEX IDX_1B6D9E5DDB997002 (hei_id), PRIMARY KEY(staff_id, hei_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  103.         $this->abortIf(
  104.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  105.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  106.         );
  107.         $this->addSql('CREATE TABLE student (id INT AUTO_INCREMENT NOT NULL, home_hei_id INT DEFAULT NULL, contact_details_id INT NOT NULL, eqf_level INT DEFAULT NULL, isced_fcode VARCHAR(4) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, birth_date DATE DEFAULT NULL, citizenship VARCHAR(2) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, gender INT DEFAULT NULL, global_id VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, updated_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_B723AF332B9D19BF (home_hei_id), UNIQUE INDEX UNIQ_B723AF337CA35EB5 (contact_details_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  108.         $this->abortIf(
  109.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  110.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  111.         );
  112.         $this->addSql('CREATE TABLE student_hei (student_id INT NOT NULL, hei_id INT NOT NULL, INDEX IDX_31C0032CB944F1A (student_id), INDEX IDX_31C0032DB997002 (hei_id), PRIMARY KEY(student_id, hei_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  113.         $this->abortIf(
  114.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  115.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  116.         );
  117.         $this->addSql('CREATE TABLE term_id (id INT AUTO_INCREMENT NOT NULL, term_number INT NOT NULL, total_terms INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  118.         $this->abortIf(
  119.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  120.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  121.         );
  122.         $this->addSql('CREATE TABLE transcript_of_records (id INT AUTO_INCREMENT NOT NULL, student_id INT NOT NULL, mobility_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', pdf VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, updated_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_63DECF46CB944F1A (student_id), UNIQUE INDEX UNIQ_63DECF468D92EAA4 (mobility_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  123.         $this->abortIf(
  124.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  125.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  126.         );
  127.         $this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, student_id INT DEFAULT NULL, staff_id INT DEFAULT NULL, email VARCHAR(180) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, roles JSON NOT NULL, password VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, is_verified TINYINT(1) NOT NULL, provider_id VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, updated_by VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, UNIQUE INDEX UNIQ_8D93D649CB944F1A (student_id), UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), UNIQUE INDEX UNIQ_8D93D649D4D57CD (staff_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
  128.     }
  129.     public function down(Schema $schema): void
  130.     {
  131.         // this down() migration is auto-generated, please modify it to your needs
  132.         $this->abortIf(
  133.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  134.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  135.         );
  136.         $this->addSql('DROP TABLE academic_term');
  137.         $this->abortIf(
  138.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  139.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  140.         );
  141.         $this->addSql('DROP TABLE contact_detail');
  142.         $this->abortIf(
  143.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  144.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  145.         );
  146.         $this->addSql('DROP TABLE course');
  147.         $this->abortIf(
  148.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  149.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  150.         );
  151.         $this->addSql('DROP TABLE course_grade');
  152.         $this->abortIf(
  153.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  154.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  155.         );
  156.         $this->addSql('DROP TABLE ext_log_entries');
  157.         $this->abortIf(
  158.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  159.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  160.         );
  161.         $this->addSql('DROP TABLE ext_translations');
  162.         $this->abortIf(
  163.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  164.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  165.         );
  166.         $this->addSql('DROP TABLE hei');
  167.         $this->abortIf(
  168.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  169.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  170.         );
  171.         $this->addSql('DROP TABLE language_level');
  172.         $this->abortIf(
  173.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  174.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  175.         );
  176.         $this->addSql('DROP TABLE learning_agreement');
  177.         $this->abortIf(
  178.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  179.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  180.         );
  181.         $this->addSql('DROP TABLE messenger_messages');
  182.         $this->abortIf(
  183.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  184.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  185.         );
  186.         $this->addSql('DROP TABLE mobility');
  187.         $this->abortIf(
  188.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  189.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  190.         );
  191.         $this->addSql('DROP TABLE notification');
  192.         $this->abortIf(
  193.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  194.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  195.         );
  196.         $this->addSql('DROP TABLE notification_receipt');
  197.         $this->abortIf(
  198.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  199.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  200.         );
  201.         $this->addSql('DROP TABLE ounit');
  202.         $this->abortIf(
  203.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  204.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  205.         );
  206.         $this->addSql('DROP TABLE signature');
  207.         $this->abortIf(
  208.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  209.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  210.         );
  211.         $this->addSql('DROP TABLE staff');
  212.         $this->abortIf(
  213.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  214.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  215.         );
  216.         $this->addSql('DROP TABLE staff_hei');
  217.         $this->abortIf(
  218.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  219.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  220.         );
  221.         $this->addSql('DROP TABLE student');
  222.         $this->abortIf(
  223.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  224.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  225.         );
  226.         $this->addSql('DROP TABLE student_hei');
  227.         $this->abortIf(
  228.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  229.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  230.         );
  231.         $this->addSql('DROP TABLE term_id');
  232.         $this->abortIf(
  233.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  234.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  235.         );
  236.         $this->addSql('DROP TABLE transcript_of_records');
  237.         $this->abortIf(
  238.             !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
  239.             "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
  240.         );
  241.         $this->addSql('DROP TABLE user');
  242.     }
  243. }