migrations/Version20200723024241.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 Version20200723024241 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.         $ids = [17,19,20,21,32,33,34,35,39,42,43,44,54,58,60,61,65,66,67,68,69,70,71,72,73,74,75,78,79,80,81,82,83,84,86,87,91,94,95,105,106,108,109,110,113,116,118,120,123,124,125,128,137,138,141,143,145,146,151,156,158,159,163,167,173,174,175,176,177,195,206,212,213,221,222,223,232,252,253,255,259,263,265,266,270,289,290,296,302,325,349,350,351,352,358,361,364,373,383,396,398,399,405,406,407,411,414,425,430,438,439,442,443,445,446,452,455,459,462,482,483,484,486,487,488,489,492,502,534,536,547,558,559,595,596,600,626,656,657,660,669,670,673,676,677,699,704,705,706,707,708,709,710,711,712,744,745,758,761,762,763,764,766,767,809];
  19.         $this->addSql('UPDATE product SET isDeleted=1 WHERE is_wholesaler=0 AND id IN('join(','$ids) .')');
  20.         $this->addSql('UPDATE product SET active=1, publicSale=0 WHERE is_wholesaler=0 AND active=0 AND id NOT IN('join(','$ids) .')');
  21.     }
  22.     public function down(Schema $schema) : void
  23.     {
  24.         // this down() migration is auto-generated, please modify it to your needs
  25.     }
  26. }