migrations/Version20260413211434.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 Version20260413211434 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 document_society RENAME INDEX idx_a90bc72ee6389d24 TO idx_docsociety_society');
  19.         $this->addSql('ALTER TABLE logo CHANGE logo_size logo_size INT DEFAULT NULL');
  20.         $this->addSql('ALTER TABLE president CHANGE is_represante_society is_represante_society TINYINT(1) DEFAULT true');
  21.         $this->addSql('CREATE INDEX idx_signatures_status ON signatures (status)');
  22.         $this->addSql('CREATE INDEX idx_society_siren ON society (siren)');
  23.         $this->addSql('CREATE INDEX idx_society_siret ON society (siret)');
  24.         $this->addSql('CREATE INDEX idx_society_name ON society (name)');
  25.         $this->addSql('CREATE INDEX idx_society_postal ON society (postal)');
  26.         $this->addSql('CREATE INDEX idx_society_status ON society (status)');
  27.         $this->addSql('CREATE INDEX idx_society_created ON society (created)');
  28.     }
  29.     public function down(Schema $schema): void
  30.     {
  31.         // this down() migration is auto-generated, please modify it to your needs
  32.         $this->addSql('ALTER TABLE document_society RENAME INDEX idx_docsociety_society TO IDX_A90BC72EE6389D24');
  33.         $this->addSql('ALTER TABLE logo CHANGE logo_size logo_size INT DEFAULT 40');
  34.         $this->addSql('ALTER TABLE president CHANGE is_represante_society is_represante_society TINYINT(1) DEFAULT 1');
  35.         $this->addSql('DROP INDEX idx_signatures_status ON signatures');
  36.         $this->addSql('DROP INDEX idx_society_siren ON society');
  37.         $this->addSql('DROP INDEX idx_society_siret ON society');
  38.         $this->addSql('DROP INDEX idx_society_name ON society');
  39.         $this->addSql('DROP INDEX idx_society_postal ON society');
  40.         $this->addSql('DROP INDEX idx_society_status ON society');
  41.         $this->addSql('DROP INDEX idx_society_created ON society');
  42.     }
  43. }