<?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 Version20220915101109 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE customer_quotations ADD is_web_shop_related TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE invoice CHANGE is_visible_in_web_constructor is_web_shop_related TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE material CHANGE is_visible_in_web_constructor is_web_shop_related TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE packaging_type CHANGE is_visible_in_web_constructor is_web_shop_related TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE pouch CHANGE is_visible_in_web_constructor is_web_shop_related TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE pouch_option CHANGE is_visible_in_web_constructor is_web_shop_related TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE price_map CHANGE is_visible_in_web_constructor is_web_shop_related TINYINT(1) NOT NULL');
$this->addSql("UPDATE customer_quotations SET is_web_shop_related = 0 WHERE is_web_shop_related IS NULL");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE customer_quotations DROP is_web_shop_related');
$this->addSql('ALTER TABLE invoice CHANGE is_web_shop_related is_visible_in_web_constructor TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE material CHANGE is_web_shop_related is_visible_in_web_constructor TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE packaging_type CHANGE is_web_shop_related is_visible_in_web_constructor TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE pouch CHANGE is_web_shop_related is_visible_in_web_constructor TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE pouch_option CHANGE is_web_shop_related is_visible_in_web_constructor TINYINT(1) NOT NULL');
$this->addSql('ALTER TABLE price_map CHANGE is_web_shop_related is_visible_in_web_constructor TINYINT(1) NOT NULL');
}
}