<?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 Version20210930134418 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 alert (id INT AUTO_INCREMENT NOT NULL, alert_level INT NOT NULL, message VARCHAR(255) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, color VARCHAR(255) NOT NULL, icon_link VARCHAR(255) DEFAULT NULL, notification_freq INT NOT NULL, notification_type VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE alert_product (id INT AUTO_INCREMENT NOT NULL, alert_level INT NOT NULL, sku VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE competitor_product (id INT AUTO_INCREMENT NOT NULL, sku VARCHAR(255) NOT NULL, competitor_id INT NOT NULL, product_url VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE general_configuration (id INT AUTO_INCREMENT NOT NULL, website_id INT NOT NULL, sync_freq_m2 INT NOT NULL, api_m2_connection VARCHAR(255) DEFAULT NULL, sync_freq_aclass INT NOT NULL, sync_freq_bclass INT NOT NULL, sync_freq_cclass INT NOT NULL, sync_freq_default INT NOT NULL, custom_attribute1 VARCHAR(255) DEFAULT NULL, custom_attribute2 VARCHAR(255) DEFAULT NULL, custom_attribute3 VARCHAR(255) DEFAULT NULL, custom_attribute4 VARCHAR(255) DEFAULT NULL, categories JSON DEFAULT NULL, cat_attribute VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE product (id INT AUTO_INCREMENT NOT NULL, sku VARCHAR(255) NOT NULL, website_id INT NOT NULL, name VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, img_product VARCHAR(255) DEFAULT NULL, status VARCHAR(255) DEFAULT NULL, product_type VARCHAR(255) DEFAULT NULL, price_type VARCHAR(255) NOT NULL, stock INT NOT NULL, stock_status VARCHAR(255) NOT NULL, normal_price NUMERIC(10, 2) NOT NULL, price_excl_tax NUMERIC(10, 2) NOT NULL, special_price NUMERIC(10, 2) NOT NULL, special_price_start_date DATETIME DEFAULT NULL, special_price_end_date DATETIME DEFAULT NULL, public_price_msrp NUMERIC(10, 2) NOT NULL, purchasing_price NUMERIC(10, 2) NOT NULL, unit_cost NUMERIC(10, 2) DEFAULT NULL, tva_class NUMERIC(10, 2) NOT NULL, abc_class VARCHAR(255) NOT NULL, custom_attribute1 VARCHAR(255) DEFAULT NULL, custom_attribute2 VARCHAR(255) DEFAULT NULL, custom_attribute3 VARCHAR(255) DEFAULT NULL, custom_attribute4 VARCHAR(255) DEFAULT NULL, cat_product_name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE alert');
$this->addSql('DROP TABLE alert_product');
$this->addSql('DROP TABLE competitor_product');
$this->addSql('DROP TABLE general_configuration');
$this->addSql('DROP TABLE product');
}
}