<?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 Version20240405143027 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('CREATE TABLE division (id INT AUTO_INCREMENT NOT NULL, customer_id INT NOT NULL, name VARCHAR(255) NOT NULL, INDEX IDX_101747149395C3F3 (customer_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE division ADD CONSTRAINT FK_101747149395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (id)');
// $this->addSql('ALTER TABLE app_translations RENAME INDEX idx_ed8c63d37987212d TO IDX_439C0067987212D');
// $this->addSql('ALTER TABLE app_translations RENAME INDEX idx_ed8c63d312469de2 TO IDX_439C00612469DE2');
// $this->addSql('ALTER TABLE app_translations_translation RENAME INDEX idx_3f806f872c2ac5d3 TO IDX_6D4A86FF2C2AC5D3');
// $this->addSql('ALTER TABLE app_translations_translation RENAME INDEX app_translation_translation_unique_translation TO app_translations_translation_unique_translation');
// $this->addSql('DROP INDEX titles_only ON country_translation');
// $this->addSql('ALTER TABLE customer RENAME INDEX fk_81398e09f92f3e70 TO IDX_81398E09F92F3E70');
// $this->addSql('DROP INDEX name ON disease_translation');
// $this->addSql('DROP INDEX titles_only ON disease_translation');
// $this->addSql('DROP INDEX name ON drug_translation');
// $this->addSql('DROP INDEX titles_only ON drug_translation');
$this->addSql('ALTER TABLE landmark ADD cover VARCHAR(255) DEFAULT NULL, ADD icon VARCHAR(255) DEFAULT NULL, ADD access_level LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
// $this->addSql('DROP INDEX titles_only ON map_marker_translation');
// $this->addSql('DROP INDEX name ON map_marker_translation');
// $this->addSql('DROP INDEX name ON medical_procedure_translation');
// $this->addSql('DROP INDEX titles_only ON medical_procedure_translation');
// $this->addSql('DROP INDEX name ON page_translation');
// $this->addSql('DROP INDEX titles_only ON page_translation');
$this->addSql('ALTER TABLE patient ADD division_id INT DEFAULT NULL, ADD role LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\'');
$this->addSql('ALTER TABLE patient ADD CONSTRAINT FK_1ADAD7EB41859289 FOREIGN KEY (division_id) REFERENCES division (id)');
$this->addSql('CREATE INDEX IDX_1ADAD7EB41859289 ON patient (division_id)');
$this->addSql('ALTER TABLE patient_result ADD division_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE patient_result ADD CONSTRAINT FK_182428E941859289 FOREIGN KEY (division_id) REFERENCES division (id)');
$this->addSql('CREATE INDEX IDX_182428E941859289 ON patient_result (division_id)');
$this->addSql('ALTER TABLE route ADD non_disabled_only TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE therapy CHANGE read_only_time read_only_time VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE patient DROP FOREIGN KEY FK_1ADAD7EB41859289');
$this->addSql('ALTER TABLE patient_result DROP FOREIGN KEY FK_182428E941859289');
$this->addSql('DROP TABLE division');
$this->addSql('ALTER TABLE app_translations RENAME INDEX idx_439c00612469de2 TO IDX_ED8C63D312469DE2');
$this->addSql('ALTER TABLE app_translations RENAME INDEX idx_439c0067987212d TO IDX_ED8C63D37987212D');
$this->addSql('ALTER TABLE app_translations_translation RENAME INDEX app_translations_translation_unique_translation TO app_translation_translation_unique_translation');
$this->addSql('ALTER TABLE app_translations_translation RENAME INDEX idx_6d4a86ff2c2ac5d3 TO IDX_3F806F872C2AC5D3');
$this->addSql('CREATE FULLTEXT INDEX titles_only ON country_translation (name)');
$this->addSql('ALTER TABLE customer RENAME INDEX idx_81398e09f92f3e70 TO FK_81398E09F92F3E70');
$this->addSql('CREATE FULLTEXT INDEX name ON disease_translation (name, description)');
$this->addSql('CREATE FULLTEXT INDEX titles_only ON disease_translation (name)');
$this->addSql('CREATE FULLTEXT INDEX name ON drug_translation (name, description)');
$this->addSql('CREATE FULLTEXT INDEX titles_only ON drug_translation (name)');
$this->addSql('ALTER TABLE landmark DROP cover, DROP icon, DROP access_level');
$this->addSql('CREATE FULLTEXT INDEX titles_only ON map_marker_translation (name)');
$this->addSql('CREATE FULLTEXT INDEX name ON map_marker_translation (name, description)');
$this->addSql('CREATE FULLTEXT INDEX name ON medical_procedure_translation (name, description)');
$this->addSql('CREATE FULLTEXT INDEX titles_only ON medical_procedure_translation (name)');
$this->addSql('CREATE FULLTEXT INDEX name ON page_translation (name, excerpt, body)');
$this->addSql('CREATE FULLTEXT INDEX titles_only ON page_translation (name)');
$this->addSql('DROP INDEX IDX_1ADAD7EB41859289 ON patient');
$this->addSql('ALTER TABLE patient DROP division_id, DROP role');
$this->addSql('DROP INDEX IDX_182428E941859289 ON patient_result');
$this->addSql('ALTER TABLE patient_result DROP division_id');
$this->addSql('ALTER TABLE route DROP non_disabled_only');
$this->addSql('ALTER TABLE therapy CHANGE read_only_time read_only_time VARCHAR(20) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
}
}