<?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 Version20250108123117 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 suppliers__price_file_params (id INT AUTO_INCREMENT NOT NULL, supplier_warehouse_id INT NOT NULL, email LONGTEXT DEFAULT NULL, ftp_params LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', site_params LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', first_row_with_product INT NOT NULL, brand_column VARCHAR(255) NOT NULL, vendor_column VARCHAR(255) NOT NULL, article_column VARCHAR(255) NOT NULL, name_column VARCHAR(255) NOT NULL, price_column VARCHAR(255) NOT NULL, fixed_price_column VARCHAR(255) DEFAULT NULL, quantity_column VARCHAR(255) NOT NULL, weight_column VARCHAR(255) NOT NULL, multiplicity_column VARCHAR(255) NOT NULL, break_column VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NULL, enabled TINYINT(1) DEFAULT 1 NOT NULL, INDEX IDX_E33E70503AE97B87 (supplier_warehouse_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE suppliers__price_list_files (id INT AUTO_INCREMENT NOT NULL, supplier_price_file_param_id INT NOT NULL, created_at DATETIME NOT NULL, source VARCHAR(255) NOT NULL, status VARCHAR(255) NOT NULL, original_name VARCHAR(255) NOT NULL, mail_message_uid INT DEFAULT NULL, report LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', error LONGTEXT DEFAULT NULL, INDEX IDX_83CE2A39F272708F (supplier_price_file_param_id), UNIQUE INDEX unique_price_list_idx (supplier_price_file_param_id, source, original_name, mail_message_uid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE suppliers__price_file_params ADD CONSTRAINT FK_E33E70503AE97B87 FOREIGN KEY (supplier_warehouse_id) REFERENCES suppliers__warehouses (id)');
$this->addSql('ALTER TABLE suppliers__price_list_files ADD CONSTRAINT FK_83CE2A39F272708F FOREIGN KEY (supplier_price_file_param_id) REFERENCES suppliers__price_file_params (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE suppliers__price_file_params DROP FOREIGN KEY FK_E33E70503AE97B87');
$this->addSql('ALTER TABLE suppliers__price_list_files DROP FOREIGN KEY FK_83CE2A39F272708F');
$this->addSql('DROP TABLE suppliers__price_file_params');
$this->addSql('DROP TABLE suppliers__price_list_files');
}
}