migrations/Version20240109175308.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 Version20240109175308 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('ALTER TABLE app_translations RENAME INDEX idx_ed8c63d37987212d TO IDX_439C0067987212D');
  19. //        $this->addSql('ALTER TABLE app_translations RENAME INDEX idx_ed8c63d312469de2 TO IDX_439C00612469DE2');
  20. //        $this->addSql('ALTER TABLE app_translations_translation RENAME INDEX idx_3f806f872c2ac5d3 TO IDX_6D4A86FF2C2AC5D3');
  21. //        $this->addSql('ALTER TABLE app_translations_translation RENAME INDEX app_translation_translation_unique_translation TO app_translations_translation_unique_translation');
  22. //        $this->addSql('DROP INDEX titles_only ON country_translation');
  23. //        $this->addSql('ALTER TABLE customer RENAME INDEX fk_81398e09f92f3e70 TO IDX_81398E09F92F3E70');
  24. //        $this->addSql('DROP INDEX name ON disease_translation');
  25. //        $this->addSql('DROP INDEX titles_only ON disease_translation');
  26. //        $this->addSql('DROP INDEX name ON drug_translation');
  27. //        $this->addSql('DROP INDEX titles_only ON drug_translation');
  28. //        $this->addSql('DROP INDEX titles_only ON map_marker_translation');
  29. //        $this->addSql('DROP INDEX name ON map_marker_translation');
  30. //        $this->addSql('DROP INDEX name ON medical_procedure_translation');
  31. //        $this->addSql('DROP INDEX titles_only ON medical_procedure_translation');
  32. //        $this->addSql('DROP INDEX name ON page_translation');
  33. //        $this->addSql('DROP INDEX titles_only ON page_translation');
  34.         $this->addSql('ALTER TABLE patient ADD notifications_email TINYINT(1) DEFAULT NULL, ADD notifications_push TINYINT(1) DEFAULT NULL, ADD notifications_sms TINYINT(1) DEFAULT NULL');
  35.     }
  36.     public function down(Schema $schema): void
  37.     {
  38.         // this down() migration is auto-generated, please modify it to your needs
  39.         $this->addSql('ALTER TABLE app_translations RENAME INDEX idx_439c00612469de2 TO IDX_ED8C63D312469DE2');
  40.         $this->addSql('ALTER TABLE app_translations RENAME INDEX idx_439c0067987212d TO IDX_ED8C63D37987212D');
  41.         $this->addSql('ALTER TABLE app_translations_translation RENAME INDEX app_translations_translation_unique_translation TO app_translation_translation_unique_translation');
  42.         $this->addSql('ALTER TABLE app_translations_translation RENAME INDEX idx_6d4a86ff2c2ac5d3 TO IDX_3F806F872C2AC5D3');
  43.         $this->addSql('CREATE FULLTEXT INDEX titles_only ON country_translation (name)');
  44.         $this->addSql('ALTER TABLE customer RENAME INDEX idx_81398e09f92f3e70 TO FK_81398E09F92F3E70');
  45.         $this->addSql('CREATE FULLTEXT INDEX name ON disease_translation (name, description)');
  46.         $this->addSql('CREATE FULLTEXT INDEX titles_only ON disease_translation (name)');
  47.         $this->addSql('CREATE FULLTEXT INDEX name ON drug_translation (name, description)');
  48.         $this->addSql('CREATE FULLTEXT INDEX titles_only ON drug_translation (name)');
  49.         $this->addSql('CREATE FULLTEXT INDEX titles_only ON map_marker_translation (name)');
  50.         $this->addSql('CREATE FULLTEXT INDEX name ON map_marker_translation (name, description)');
  51.         $this->addSql('CREATE FULLTEXT INDEX name ON medical_procedure_translation (name, description)');
  52.         $this->addSql('CREATE FULLTEXT INDEX titles_only ON medical_procedure_translation (name)');
  53.         $this->addSql('CREATE FULLTEXT INDEX name ON page_translation (name, excerpt, body)');
  54.         $this->addSql('CREATE FULLTEXT INDEX titles_only ON page_translation (name)');
  55.         $this->addSql('ALTER TABLE patient DROP notifications_email, DROP notifications_push, DROP notifications_sms');
  56.     }
  57. }