migrations/Version20220120235949.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 Version20220120235949 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('DROP INDEX idx_c667e5117e8e8aa2');
  19.         $this->addSql('DROP INDEX idx_c667e511a76ed395');
  20.         $this->addSql('ALTER TABLE integration__connection_shoper ADD app_id VARCHAR(150) NOT NULL');
  21.         $this->addSql('ALTER TABLE integration__connection_shoper ADD app_secret VARCHAR(150) NOT NULL');
  22.         $this->addSql('ALTER TABLE integration__connection_shoper ADD app_store_secret VARCHAR(150) NOT NULL');
  23.         $this->addSql('CREATE UNIQUE INDEX UNIQ_C667E511A76ED395 ON integration__connection_shoper (user_id)');
  24.         $this->addSql('CREATE UNIQUE INDEX UNIQ_C667E5117E8E8AA2 ON integration__connection_shoper (pim_id)');
  25.     }
  26.     public function down(Schema $schema): void
  27.     {
  28.         // this down() migration is auto-generated, please modify it to your needs
  29.         $this->addSql('CREATE SCHEMA public');
  30.         $this->addSql('DROP INDEX UNIQ_C667E511A76ED395');
  31.         $this->addSql('DROP INDEX UNIQ_C667E5117E8E8AA2');
  32.         $this->addSql('ALTER TABLE integration__connection_shoper DROP app_id');
  33.         $this->addSql('ALTER TABLE integration__connection_shoper DROP app_secret');
  34.         $this->addSql('ALTER TABLE integration__connection_shoper DROP app_store_secret');
  35.         $this->addSql('CREATE INDEX idx_c667e5117e8e8aa2 ON integration__connection_shoper (pim_id)');
  36.         $this->addSql('CREATE INDEX idx_c667e511a76ed395 ON integration__connection_shoper (user_id)');
  37.     }
  38. }