<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230227094809 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$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 = \'\' ');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE academic_term');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE contact_detail');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE course');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE course_grade');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE ext_log_entries');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE ext_translations');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE hei');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE language_level');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE learning_agreement');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE messenger_messages');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE mobility');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE notification');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE notification_receipt');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE ounit');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE signature');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE staff');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE staff_hei');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE student');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE student_hei');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE term_id');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE transcript_of_records');
$this->abortIf(
!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySQL57Platform,
"Migration can only be executed safely on '\Doctrine\DBAL\Platforms\MySQL57Platform'."
);
$this->addSql('DROP TABLE user');
}
}