<?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 Version20220105215514 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->addSql('DROP TABLE IF EXISTS proctoru_timezones');
#$this->addSql('ALTER TABLE charges DROP description');
#$this->addSql('ALTER TABLE exams DROP study_materials_url');
#$this->addSql('ALTER TABLE registrations DROP proctorUrl');
$this->addSql('ALTER TABLE exams MODIFY COLUMN `language` tinyint(1) DEFAULT NULL AFTER talGroupCode');
$this->addSql('ALTER TABLE exams MODIFY COLUMN `content_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL AFTER language');
$this->addSql('ALTER TABLE exams MODIFY COLUMN `group_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL AFTER content_code');
$this->addSql('ALTER TABLE registrations MODIFY COLUMN `proctorUuid` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL AFTER onlineAccess');
$this->addSql('ALTER TABLE registrations MODIFY COLUMN `online_proctor_access` datetime DEFAULT NULL AFTER proctorUuid');
$this->addSql('ALTER TABLE registrations MODIFY COLUMN `online_exam_redirect` datetime DEFAULT NULL AFTER online_proctor_access');
$this->addSql('ALTER TABLE registrations MODIFY COLUMN `online_exam_started` datetime DEFAULT NULL AFTER online_exam_redirect');
$this->addSql('ALTER TABLE registrations MODIFY COLUMN `online_exam_completed` datetime DEFAULT NULL AFTER online_exam_started');
$this->addSql('ALTER TABLE registrations MODIFY COLUMN `session_scheduled` datetime DEFAULT NULL AFTER online_exam_completed');
$this->addSql('ALTER TABLE registrations MODIFY COLUMN `proctor_fee_price` decimal(6,2) DEFAULT NULL AFTER session_scheduled');
$this->addSql('ALTER TABLE registrations MODIFY COLUMN `proctor_reserved` datetime DEFAULT NULL AFTER proctor_fee_price');
$this->addSql('ALTER TABLE students MODIFY COLUMN `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL AFTER ttiStudentId');
$this->addSql('ALTER TABLE students MODIFY COLUMN `roles` json DEFAULT NULL AFTER password');
$this->addSql('ALTER TABLE students MODIFY COLUMN `tal_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL AFTER roles');
$this->addSql('ALTER TABLE students MODIFY COLUMN `tal_guid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL AFTER tal_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE proctoru_timezones (id INT AUTO_INCREMENT NOT NULL, timezone_no INT NOT NULL, gmt_offset INT NOT NULL, proctoru_id VARCHAR(200) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, display_name VARCHAR(200) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, description VARCHAR(200) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, sort_order INT NOT NULL, dst SMALLINT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('DROP INDEX registrationId ON charges');
$this->addSql('ALTER TABLE charges ADD description VARCHAR(50) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`');
$this->addSql('ALTER TABLE exams ADD study_materials_url VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`');
$this->addSql('ALTER TABLE registrations ADD proctorUrl VARCHAR(250) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`, ADD session_proctor_reserved DATETIME DEFAULT NULL');
}
}