<?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 Version20220119084612 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('CREATE TABLE website (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE competitor_product ADD stack_errors INT NOT NULL');
$this->addSql('ALTER TABLE general_configuration ADD config_name VARCHAR(255) NOT NULL, ADD config_value JSON DEFAULT NULL, DROP sync_freq_m2, DROP api_m2_connection, DROP sync_freq_aclass, DROP sync_freq_bclass, DROP sync_freq_cclass, DROP sync_freq_default, DROP custom_attribute1, DROP custom_attribute2, DROP custom_attribute3, DROP custom_attribute4, DROP categories, DROP cat_attribute, DROP attribute1_list, DROP attribute2_list, DROP attribute3_list, DROP attribute4_list, DROP class_abc_list');
$this->addSql('ALTER TABLE price_scraped ADD message JSON DEFAULT NULL, ADD process TINYINT(1) NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE website');
$this->addSql('ALTER TABLE competitor_product DROP stack_errors');
$this->addSql('ALTER TABLE general_configuration ADD sync_freq_m2 INT NOT NULL, ADD api_m2_connection VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD sync_freq_aclass INT NOT NULL, ADD sync_freq_bclass INT NOT NULL, ADD sync_freq_cclass INT NOT NULL, ADD sync_freq_default INT NOT NULL, ADD custom_attribute1 VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD custom_attribute2 VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD custom_attribute3 VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD custom_attribute4 VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD cat_attribute VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD attribute1_list JSON DEFAULT NULL, ADD attribute2_list JSON DEFAULT NULL, ADD attribute3_list JSON DEFAULT NULL, ADD attribute4_list JSON DEFAULT NULL, ADD class_abc_list JSON DEFAULT NULL, DROP config_name, CHANGE config_value categories JSON DEFAULT NULL');
$this->addSql('ALTER TABLE price_scraped DROP message, DROP process');
}
}