migrations/Version20230216130818.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 Version20230216130818 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql(
  18.             "UPDATE package_size
  19.                     SET code = 'flat_bottom.stock.s', depth = 75
  20.                      WHERE height = 200 AND width = 130 AND depth = 70 AND grams = 250"
  21.         );
  22.         $this->addSql(
  23.             "UPDATE package_size
  24.                     SET code = 'flat_bottom.stock.m', height = 260
  25.                      WHERE height = 265 AND width = 135 AND depth = 75 AND grams = 500"
  26.         );
  27.         $this->addSql(
  28.             "UPDATE package_size
  29.                     SET code = 'flat_bottom.stock.l', height = 320
  30.                      WHERE height = 325 AND width = 150 AND depth = 95 AND grams = 1000"
  31.         );
  32.         $this->addSql("                      
  33.                         INSERT INTO package_size(code, height, width, depth, grams, uuid, is_web_shop_related)
  34.                                 VALUES
  35.                                         ('doypack.stock.s', 225, 130, 70, 100, UUID(), 1),
  36.                                         ('doypack.stock.m', 270, 160, 80, 250, UUID(), 1),
  37.                                         ('doypack.stock.l', 290, 180, 90, 500, UUID(), 1)
  38.                                     ");
  39.     }
  40.     public function down(Schema $schema): void
  41.     {
  42.     }
  43. }