<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220822070538 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE price_map ADD is_visible_in_web_constructor TINYINT(1) NOT NULL');
// /**
// * white-matte-plastic
// */
// $this->addSql("
// INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
// SELECT
// 'price_map.pop-white-matte-plastic',
// price_map.pouch_options,
// price_map.sustainable,
// UUID(),
// technology.id,
// varnish.id,
// material.id,
// price_map.structure_thickness,
// 1
// FROM price_map
// INNER JOIN technology
// ON technology.code = 'technologies.screen_printing'
// INNER JOIN varnish
// ON varnish.code = 'finishing.holography'
// INNER JOIN material
// ON material.code = 'material.white_matte_plastic'
// WHERE price_map.code = 'price_map.white-matte-plastic'
// ");
// $this->addSql("
// INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
// SELECT
// 'unit.pcs',
// pop_web.id,
// price_list.grams,
// price_list.height,
// price_list.width,
// price_list.depth,
// price_list.min_quantity,
// price_list.max_quantity,
// price_list.price_per_unit,
// package_size.id,
// UUID()
// FROM price_list
// INNER JOIN price_map AS printella
// ON printella.code = 'price_map.white-matte-plastic'
// INNER JOIN price_map AS pop_web
// ON pop_web.code = 'price_map.pop-white-matte-plastic'
// INNER JOIN package_size
// ON package_size.grams = price_list.grams
// WHERE price_list.price_map_id = printella.id
// ");
//
// /**
// * white-kraft-paper
// */
// $this->addSql("
// INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
// SELECT
// 'price_map.pop-white-kraft-paper',
// price_map.pouch_options,
// price_map.sustainable,
// UUID(),
// technology.id,
// varnish.id,
// material.id,
// price_map.structure_thickness,
// 1
// FROM price_map
// INNER JOIN technology
// ON technology.code = 'technologies.screen_printing'
// INNER JOIN varnish
// ON varnish.code = 'finishing.holography'
// INNER JOIN material
// ON material.code = 'material.white_kraft_paper'
// WHERE price_map.code = 'price_map.white-kraft-paper'
// ");
// $this->addSql("
// INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
// SELECT
// 'unit.pcs',
// pop_web.id,
// price_list.grams,
// price_list.height,
// price_list.width,
// price_list.depth,
// price_list.min_quantity,
// price_list.max_quantity,
// price_list.price_per_unit,
// package_size.id,
// UUID()
// FROM price_list
// INNER JOIN price_map AS printela
// ON printela.code = 'price_map.white-kraft-paper'
// INNER JOIN price_map AS pop_web
// ON pop_web.code = 'price_map.pop-white-kraft-paper'
// INNER JOIN package_size
// ON package_size.grams = price_list.grams
// WHERE price_list.price_map_id = printela.id
// ");
//
// /**
// * transparent-plastic
// */
// $this->addSql("
// INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
// SELECT
// 'price_map.pop-transparent-plastic',
// price_map.pouch_options,
// price_map.sustainable,
// UUID(),
// technology.id,
// varnish.id,
// material.id,
// price_map.structure_thickness,
// 1
// FROM price_map
// INNER JOIN technology
// ON technology.code = 'technologies.screen_printing'
// INNER JOIN varnish
// ON varnish.code = 'finishing.holography'
// INNER JOIN material
// ON material.code = 'material.transparent_plastic'
// WHERE price_map.code = 'price_map.transparent-plastic'
// ");
// $this->addSql("
// INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
// SELECT
// 'unit.pcs',
// pop_web.id,
// price_list.grams,
// price_list.height,
// price_list.width,
// price_list.depth,
// price_list.min_quantity,
// price_list.max_quantity,
// price_list.price_per_unit,
// package_size.id,
// UUID()
// FROM price_list
// INNER JOIN price_map AS printela
// ON printela.code = 'price_map.transparent-plastic'
// INNER JOIN price_map AS pop_web
// ON pop_web.code = 'price_map.pop-transparent-plastic'
// INNER JOIN package_size
// ON package_size.grams = price_list.grams
// WHERE price_list.price_map_id = printela.id
// ");
//
// /**
// * Recyclable PE pouch
// */
// $this->addSql("
// INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
// SELECT
// 'price_map.pop-recyclable-pe-pouch',
// price_map.pouch_options,
// price_map.sustainable,
// UUID(),
// technology.id,
// varnish.id,
// material.id,
// price_map.structure_thickness,
// 1
// FROM price_map
// INNER JOIN technology
// ON technology.code = 'technologies.screen_printing'
// INNER JOIN varnish
// ON varnish.code = 'finishing.holography'
// INNER JOIN material
// ON material.code = 'material.recyclable_pe_pouch'
// WHERE price_map.code = 'price_map.recyclable-pe-pouch'
// ");
// $this->addSql("
// INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
// SELECT
// 'unit.pcs',
// pop_web.id,
// price_list.grams,
// price_list.height,
// price_list.width,
// price_list.depth,
// price_list.min_quantity,
// price_list.max_quantity,
// price_list.price_per_unit,
// package_size.id,
// UUID()
// FROM price_list
// INNER JOIN price_map AS printela
// ON printela.code = 'price_map.recyclable-pe-pouch'
// INNER JOIN price_map AS pop_web
// ON pop_web.code = 'price_map.pop-recyclable-pe-pouch'
// INNER JOIN package_size
// ON package_size.grams = price_list.grams
// WHERE price_list.price_map_id = printela.id
// ");
//
// /**
// * metallic-gloss-plastic
// */
// $this->addSql("
// INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
// SELECT
// 'price_map.pop-metallic-gloss-plastic',
// price_map.pouch_options,
// price_map.sustainable,
// UUID(),
// technology.id,
// varnish.id,
// material.id,
// price_map.structure_thickness,
// 1
// FROM price_map
// INNER JOIN technology
// ON technology.code = 'technologies.screen_printing'
// INNER JOIN varnish
// ON varnish.code = 'finishing.holography'
// INNER JOIN material
// ON material.code = 'material.metallic_gloss_plastic'
// WHERE price_map.code = 'price_map.metallic-gloss-plastic'
// ");
// $this->addSql("
// INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
// SELECT
// 'unit.pcs',
// pop_web.id,
// price_list.grams,
// price_list.height,
// price_list.width,
// price_list.depth,
// price_list.min_quantity,
// price_list.max_quantity,
// price_list.price_per_unit,
// package_size.id,
// UUID()
// FROM price_list
// INNER JOIN price_map AS printela
// ON printela.code = 'price_map.metallic-gloss-plastic'
// INNER JOIN price_map AS pop_web
// ON pop_web.code = 'price_map.pop-metallic-gloss-plastic'
// INNER JOIN package_size
// ON package_size.grams = price_list.grams
// WHERE price_list.price_map_id = printela.id
// ");
//
// /**
// * metallic-matte-plastic
// */
// $this->addSql("
// INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
// SELECT
// 'price_map.pop-metallic-matte-plastic',
// price_map.pouch_options,
// price_map.sustainable,
// UUID(),
// technology.id,
// varnish.id,
// material.id,
// price_map.structure_thickness,
// 1
// FROM price_map
// INNER JOIN technology
// ON technology.code = 'technologies.screen_printing'
// INNER JOIN varnish
// ON varnish.code = 'finishing.holography'
// INNER JOIN material
// ON material.code = 'material.metallic_matte_plastic'
// WHERE price_map.code = 'price_map.metallic-matte-plastic'
// ");
// $this->addSql("
// INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
// SELECT
// 'unit.pcs',
// pop_web.id,
// price_list.grams,
// price_list.height,
// price_list.width,
// price_list.depth,
// price_list.min_quantity,
// price_list.max_quantity,
// price_list.price_per_unit,
// package_size.id,
// UUID()
// FROM price_list
// INNER JOIN price_map AS printela
// ON printela.code = 'price_map.metallic-matte-plastic'
// INNER JOIN price_map AS pop_web
// ON pop_web.code = 'price_map.pop-metallic-matte-plastic'
// INNER JOIN package_size
// ON package_size.grams = price_list.grams
// WHERE price_list.price_map_id = printela.id
// ");
//
// /**
// * white-gloss-plastic
// */
// $this->addSql("
// INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
// SELECT
// 'price_map.pop-white-gloss-plastic',
// price_map.pouch_options,
// price_map.sustainable,
// UUID(),
// technology.id,
// varnish.id,
// material.id,
// price_map.structure_thickness,
// 1
// FROM price_map
// INNER JOIN technology
// ON technology.code = 'technologies.screen_printing'
// INNER JOIN varnish
// ON varnish.code = 'finishing.holography'
// INNER JOIN material
// ON material.code = 'material.white_gloss_plastic'
// WHERE price_map.code = 'price_map.white-gloss-plastic'
// ");
// $this->addSql("
// INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
// SELECT
// 'unit.pcs',
// pop_web.id,
// price_list.grams,
// price_list.height,
// price_list.width,
// price_list.depth,
// price_list.min_quantity,
// price_list.max_quantity,
// price_list.price_per_unit,
// package_size.id,
// UUID()
// FROM price_list
// INNER JOIN price_map AS printela
// ON printela.code = 'price_map.white-gloss-plastic'
// INNER JOIN price_map AS pop_web
// ON pop_web.code = 'price_map.pop-white-gloss-plastic'
// INNER JOIN package_size
// ON package_size.grams = price_list.grams
// WHERE price_list.price_map_id = printela.id
// ");
//
// /**
// * brown-kraft-paper
// */
// $this->addSql("
// INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
// SELECT
// 'price_map.pop-brown-kraft-paper',
// price_map.pouch_options,
// price_map.sustainable,
// UUID(),
// technology.id,
// varnish.id,
// material.id,
// price_map.structure_thickness,
// 1
// FROM price_map
// INNER JOIN technology
// ON technology.code = 'technologies.screen_printing'
// INNER JOIN varnish
// ON varnish.code = 'finishing.holography'
// INNER JOIN material
// ON material.code = 'material.brown_kraft_paper'
// WHERE price_map.code = 'price_map.brown-kraft-paper'
// ");
// $this->addSql("
// INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
// SELECT
// 'unit.pcs',
// pop_web.id,
// price_list.grams,
// price_list.height,
// price_list.width,
// price_list.depth,
// price_list.min_quantity,
// price_list.max_quantity,
// price_list.price_per_unit,
// package_size.id,
// UUID()
// FROM price_list
// INNER JOIN price_map AS printela
// ON printela.code = 'price_map.brown-kraft-paper'
// INNER JOIN price_map AS pop_web
// ON pop_web.code = 'price_map.pop-brown-kraft-paper'
// INNER JOIN package_size
// ON package_size.grams = price_list.grams
// WHERE price_list.price_map_id = printela.id
// ");
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE price_map DROP is_visible_in_web_constructor');
}
}