migrations/Version20220209095021.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 Version20220209095021 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(
  19.             "UPDATE subscription_settings 
  20.                     SET subscription_settings.type = 'subscription.setting.type.all'
  21.                      WHERE event_id IN (SELECT event.id 
  22.                                         FROM event
  23.                                         WHERE event.code = 'sample.transition.to_producing')"
  24.         );
  25.         $this->addSql(
  26.             "UPDATE subscription_settings 
  27.                     SET subscription_settings.type = 'subscription.setting.type.all'
  28.                      WHERE event_id IN (SELECT event.id 
  29.                                         FROM event
  30.                                         WHERE event.code = 'sample.transition.to_transit_to_office')"
  31.         );
  32.         $this->addSql(
  33.             "UPDATE subscription_settings 
  34.                     SET subscription_settings.type = 'subscription.setting.type.all'
  35.                      WHERE event_id IN (SELECT event.id 
  36.                                         FROM event
  37.                                         WHERE event.code = 'sample.transition.to_office')"
  38.         );
  39.         $this->addSql(
  40.             "UPDATE subscription_settings 
  41.                     SET subscription_settings.type = 'subscription.setting.type.all'
  42.                      WHERE event_id IN (SELECT event.id 
  43.                                         FROM event
  44.                                         WHERE event.code = 'sample.transition.to_transit_to_customer')"
  45.         );
  46.         $this->addSql(
  47.             "UPDATE subscription_settings 
  48.                     SET subscription_settings.type = 'subscription.setting.type.all'
  49.                      WHERE event_id IN (SELECT event.id 
  50.                                         FROM event
  51.                                         WHERE event.code = 'sample.transition.to_delivered')"
  52.         );
  53.     }
  54.     public function down(Schema $schema): void
  55.     {
  56.         // this down() migration is auto-generated, please modify it to your needs
  57.     }
  58. }