<?php
declare(strict_types=1);
namespace CoreMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220201112957 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 products_bundle__attribute (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', attribute_group_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', name VARCHAR(128) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_929927FF62D643B7 (attribute_group_id), INDEX IDX_929927FFB03A8386 (created_by_id), INDEX IDX_929927FF896DBBDE (updated_by_id), INDEX IDX_929927FFC76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__attribute_group (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', name VARCHAR(128) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_4E023231B03A8386 (created_by_id), INDEX IDX_4E023231896DBBDE (updated_by_id), INDEX IDX_4E023231C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__attribute_group_translations (id INT AUTO_INCREMENT NOT NULL, object_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', locale VARCHAR(8) NOT NULL, field VARCHAR(32) NOT NULL, content LONGTEXT DEFAULT NULL, INDEX IDX_660EAACD232D562B (object_id), UNIQUE INDEX lookup_unique_idx (locale, object_id, field), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__attribute_translations (id INT AUTO_INCREMENT NOT NULL, object_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', locale VARCHAR(8) NOT NULL, field VARCHAR(32) NOT NULL, content LONGTEXT DEFAULT NULL, INDEX IDX_AAAF91FA232D562B (object_id), UNIQUE INDEX lookup_unique_idx (locale, object_id, field), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__brand (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', name VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_E6FC9E69B03A8386 (created_by_id), INDEX IDX_E6FC9E69896DBBDE (updated_by_id), INDEX IDX_E6FC9E69C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__brand_translations (id INT AUTO_INCREMENT NOT NULL, object_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', locale VARCHAR(8) NOT NULL, field VARCHAR(32) NOT NULL, content LONGTEXT DEFAULT NULL, INDEX IDX_2941B107232D562B (object_id), UNIQUE INDEX lookup_unique_idx (locale, object_id, field), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__declination (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', product_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', reference VARCHAR(128) DEFAULT NULL, ean13 VARCHAR(13) DEFAULT NULL, wholesale_price NUMERIC(20, 6) DEFAULT NULL, sell_price NUMERIC(20, 6) DEFAULT NULL, initial_unit NUMERIC(20, 6) DEFAULT NULL, weight NUMERIC(20, 6) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_CC8BB1204584665A (product_id), INDEX IDX_CC8BB120B03A8386 (created_by_id), INDEX IDX_CC8BB120896DBBDE (updated_by_id), INDEX IDX_CC8BB120C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__declination_attribute (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', declination_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', attribute_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_A248F59B9941A932 (declination_id), INDEX IDX_A248F59BB6E62EFA (attribute_id), INDEX IDX_A248F59BB03A8386 (created_by_id), INDEX IDX_A248F59B896DBBDE (updated_by_id), INDEX IDX_A248F59BC76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__eco_part (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', eco_part_group_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', name VARCHAR(128) NOT NULL, reference VARCHAR(128) DEFAULT NULL, amount NUMERIC(20, 6) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, is_active TINYINT(1) NOT NULL, INDEX IDX_52A691535F7690E5 (eco_part_group_id), INDEX IDX_52A69153B03A8386 (created_by_id), INDEX IDX_52A69153896DBBDE (updated_by_id), INDEX IDX_52A69153C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__eco_part_group (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', name VARCHAR(128) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, is_active TINYINT(1) NOT NULL, INDEX IDX_86BC60A7B03A8386 (created_by_id), INDEX IDX_86BC60A7896DBBDE (updated_by_id), INDEX IDX_86BC60A7C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__eco_part_group_translations (id INT AUTO_INCREMENT NOT NULL, object_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', locale VARCHAR(8) NOT NULL, field VARCHAR(32) NOT NULL, content LONGTEXT DEFAULT NULL, INDEX IDX_6453299E232D562B (object_id), UNIQUE INDEX lookup_unique_idx (locale, object_id, field), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__eco_part_translations (id INT AUTO_INCREMENT NOT NULL, object_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', locale VARCHAR(8) NOT NULL, field VARCHAR(32) NOT NULL, content LONGTEXT DEFAULT NULL, INDEX IDX_7BFF0B9C232D562B (object_id), UNIQUE INDEX lookup_unique_idx (locale, object_id, field), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__product (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', product_type_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', unit_measure_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', eco_part_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', tax_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', brand_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', currency_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', parent_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', name VARCHAR(255) NOT NULL, reference VARCHAR(255) DEFAULT NULL, summary VARCHAR(255) DEFAULT NULL, ean13 VARCHAR(13) DEFAULT NULL, description LONGTEXT DEFAULT NULL, wholesale_price NUMERIC(20, 6) DEFAULT NULL, sell_price NUMERIC(20, 6) DEFAULT NULL, initial_unit NUMERIC(20, 6) DEFAULT NULL, weight NUMERIC(20, 6) DEFAULT NULL, width NUMERIC(20, 6) DEFAULT NULL, height NUMERIC(20, 6) DEFAULT NULL, depth NUMERIC(20, 6) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, is_active TINYINT(1) NOT NULL, INDEX IDX_C6C10D4A14959723 (product_type_id), INDEX IDX_C6C10D4A5E0BEBC0 (unit_measure_id), INDEX IDX_C6C10D4AAE870F68 (eco_part_id), INDEX IDX_C6C10D4AB2A824D8 (tax_id), INDEX IDX_C6C10D4A44F5D008 (brand_id), INDEX IDX_C6C10D4A38248176 (currency_id), INDEX IDX_C6C10D4A727ACA70 (parent_id), INDEX IDX_C6C10D4AB03A8386 (created_by_id), INDEX IDX_C6C10D4A896DBBDE (updated_by_id), INDEX IDX_C6C10D4AC76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__product_context (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', product_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', context_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', INDEX IDX_F37E0B8C4584665A (product_id), INDEX IDX_F37E0B8C6B00C1CF (context_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__product_translations (id INT AUTO_INCREMENT NOT NULL, object_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', locale VARCHAR(8) NOT NULL, field VARCHAR(32) NOT NULL, content LONGTEXT DEFAULT NULL, INDEX IDX_9017C31B232D562B (object_id), UNIQUE INDEX lookup_unique_idx (locale, object_id, field), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__product_type (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', number INT NOT NULL, name VARCHAR(40) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, is_active TINYINT(1) NOT NULL, INDEX IDX_3C1F33B8B03A8386 (created_by_id), INDEX IDX_3C1F33B8896DBBDE (updated_by_id), INDEX IDX_3C1F33B8C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE products_bundle__product_type_translations (id INT AUTO_INCREMENT NOT NULL, object_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', locale VARCHAR(8) NOT NULL, field VARCHAR(32) NOT NULL, content LONGTEXT DEFAULT NULL, INDEX IDX_4D8A1534232D562B (object_id), UNIQUE INDEX lookup_unique_idx (locale, object_id, field), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE products_bundle__attribute ADD CONSTRAINT FK_929927FF62D643B7 FOREIGN KEY (attribute_group_id) REFERENCES products_bundle__attribute_group (id)');
$this->addSql('ALTER TABLE products_bundle__attribute ADD CONSTRAINT FK_929927FFB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__attribute ADD CONSTRAINT FK_929927FF896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__attribute ADD CONSTRAINT FK_929927FFC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__attribute_group ADD CONSTRAINT FK_4E023231B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__attribute_group ADD CONSTRAINT FK_4E023231896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__attribute_group ADD CONSTRAINT FK_4E023231C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__attribute_group_translations ADD CONSTRAINT FK_660EAACD232D562B FOREIGN KEY (object_id) REFERENCES products_bundle__attribute_group (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE products_bundle__attribute_translations ADD CONSTRAINT FK_AAAF91FA232D562B FOREIGN KEY (object_id) REFERENCES products_bundle__attribute (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE products_bundle__brand ADD CONSTRAINT FK_E6FC9E69B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__brand ADD CONSTRAINT FK_E6FC9E69896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__brand ADD CONSTRAINT FK_E6FC9E69C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__brand_translations ADD CONSTRAINT FK_2941B107232D562B FOREIGN KEY (object_id) REFERENCES products_bundle__brand (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE products_bundle__declination ADD CONSTRAINT FK_CC8BB1204584665A FOREIGN KEY (product_id) REFERENCES products_bundle__product (id)');
$this->addSql('ALTER TABLE products_bundle__declination ADD CONSTRAINT FK_CC8BB120B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__declination ADD CONSTRAINT FK_CC8BB120896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__declination ADD CONSTRAINT FK_CC8BB120C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__declination_attribute ADD CONSTRAINT FK_A248F59B9941A932 FOREIGN KEY (declination_id) REFERENCES products_bundle__declination (id)');
$this->addSql('ALTER TABLE products_bundle__declination_attribute ADD CONSTRAINT FK_A248F59BB6E62EFA FOREIGN KEY (attribute_id) REFERENCES products_bundle__attribute (id)');
$this->addSql('ALTER TABLE products_bundle__declination_attribute ADD CONSTRAINT FK_A248F59BB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__declination_attribute ADD CONSTRAINT FK_A248F59B896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__declination_attribute ADD CONSTRAINT FK_A248F59BC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__eco_part ADD CONSTRAINT FK_52A691535F7690E5 FOREIGN KEY (eco_part_group_id) REFERENCES products_bundle__eco_part_group (id)');
$this->addSql('ALTER TABLE products_bundle__eco_part ADD CONSTRAINT FK_52A69153B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__eco_part ADD CONSTRAINT FK_52A69153896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__eco_part ADD CONSTRAINT FK_52A69153C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__eco_part_group ADD CONSTRAINT FK_86BC60A7B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__eco_part_group ADD CONSTRAINT FK_86BC60A7896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__eco_part_group ADD CONSTRAINT FK_86BC60A7C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__eco_part_group_translations ADD CONSTRAINT FK_6453299E232D562B FOREIGN KEY (object_id) REFERENCES products_bundle__eco_part_group (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE products_bundle__eco_part_translations ADD CONSTRAINT FK_7BFF0B9C232D562B FOREIGN KEY (object_id) REFERENCES products_bundle__eco_part (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE products_bundle__product ADD CONSTRAINT FK_C6C10D4A14959723 FOREIGN KEY (product_type_id) REFERENCES products_bundle__product_type (id)');
$this->addSql('ALTER TABLE products_bundle__product ADD CONSTRAINT FK_C6C10D4A5E0BEBC0 FOREIGN KEY (unit_measure_id) REFERENCES unit_measure (id)');
$this->addSql('ALTER TABLE products_bundle__product ADD CONSTRAINT FK_C6C10D4AAE870F68 FOREIGN KEY (eco_part_id) REFERENCES products_bundle__eco_part (id)');
$this->addSql('ALTER TABLE products_bundle__product ADD CONSTRAINT FK_C6C10D4AB2A824D8 FOREIGN KEY (tax_id) REFERENCES tax (id)');
$this->addSql('ALTER TABLE products_bundle__product ADD CONSTRAINT FK_C6C10D4A44F5D008 FOREIGN KEY (brand_id) REFERENCES products_bundle__brand (id)');
$this->addSql('ALTER TABLE products_bundle__product ADD CONSTRAINT FK_C6C10D4A38248176 FOREIGN KEY (currency_id) REFERENCES currency (id)');
$this->addSql('ALTER TABLE products_bundle__product ADD CONSTRAINT FK_C6C10D4A727ACA70 FOREIGN KEY (parent_id) REFERENCES products_bundle__product (id)');
$this->addSql('ALTER TABLE products_bundle__product ADD CONSTRAINT FK_C6C10D4AB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__product ADD CONSTRAINT FK_C6C10D4A896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__product ADD CONSTRAINT FK_C6C10D4AC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__product_context ADD CONSTRAINT FK_F37E0B8C4584665A FOREIGN KEY (product_id) REFERENCES products_bundle__product (id)');
$this->addSql('ALTER TABLE products_bundle__product_context ADD CONSTRAINT FK_F37E0B8C6B00C1CF FOREIGN KEY (context_id) REFERENCES context (id)');
$this->addSql('ALTER TABLE products_bundle__product_translations ADD CONSTRAINT FK_9017C31B232D562B FOREIGN KEY (object_id) REFERENCES products_bundle__product (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE products_bundle__product_type ADD CONSTRAINT FK_3C1F33B8B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__product_type ADD CONSTRAINT FK_3C1F33B8896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__product_type ADD CONSTRAINT FK_3C1F33B8C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__product_type_translations ADD CONSTRAINT FK_4D8A1534232D562B FOREIGN KEY (object_id) REFERENCES products_bundle__product_type (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE currency CHANGE change_rate change_rate NUMERIC(20, 12) DEFAULT \'1\' NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE products_bundle__attribute_translations DROP FOREIGN KEY FK_AAAF91FA232D562B');
$this->addSql('ALTER TABLE products_bundle__declination_attribute DROP FOREIGN KEY FK_A248F59BB6E62EFA');
$this->addSql('ALTER TABLE products_bundle__attribute DROP FOREIGN KEY FK_929927FF62D643B7');
$this->addSql('ALTER TABLE products_bundle__attribute_group_translations DROP FOREIGN KEY FK_660EAACD232D562B');
$this->addSql('ALTER TABLE products_bundle__brand_translations DROP FOREIGN KEY FK_2941B107232D562B');
$this->addSql('ALTER TABLE products_bundle__product DROP FOREIGN KEY FK_C6C10D4A44F5D008');
$this->addSql('ALTER TABLE products_bundle__declination_attribute DROP FOREIGN KEY FK_A248F59B9941A932');
$this->addSql('ALTER TABLE products_bundle__eco_part_translations DROP FOREIGN KEY FK_7BFF0B9C232D562B');
$this->addSql('ALTER TABLE products_bundle__product DROP FOREIGN KEY FK_C6C10D4AAE870F68');
$this->addSql('ALTER TABLE products_bundle__eco_part DROP FOREIGN KEY FK_52A691535F7690E5');
$this->addSql('ALTER TABLE products_bundle__eco_part_group_translations DROP FOREIGN KEY FK_6453299E232D562B');
$this->addSql('ALTER TABLE products_bundle__declination DROP FOREIGN KEY FK_CC8BB1204584665A');
$this->addSql('ALTER TABLE products_bundle__product DROP FOREIGN KEY FK_C6C10D4A727ACA70');
$this->addSql('ALTER TABLE products_bundle__product_context DROP FOREIGN KEY FK_F37E0B8C4584665A');
$this->addSql('ALTER TABLE products_bundle__product_translations DROP FOREIGN KEY FK_9017C31B232D562B');
$this->addSql('ALTER TABLE products_bundle__product DROP FOREIGN KEY FK_C6C10D4A14959723');
$this->addSql('ALTER TABLE products_bundle__product_type_translations DROP FOREIGN KEY FK_4D8A1534232D562B');
$this->addSql('DROP TABLE products_bundle__attribute');
$this->addSql('DROP TABLE products_bundle__attribute_group');
$this->addSql('DROP TABLE products_bundle__attribute_group_translations');
$this->addSql('DROP TABLE products_bundle__attribute_translations');
$this->addSql('DROP TABLE products_bundle__brand');
$this->addSql('DROP TABLE products_bundle__brand_translations');
$this->addSql('DROP TABLE products_bundle__declination');
$this->addSql('DROP TABLE products_bundle__declination_attribute');
$this->addSql('DROP TABLE products_bundle__eco_part');
$this->addSql('DROP TABLE products_bundle__eco_part_group');
$this->addSql('DROP TABLE products_bundle__eco_part_group_translations');
$this->addSql('DROP TABLE products_bundle__eco_part_translations');
$this->addSql('DROP TABLE products_bundle__product');
$this->addSql('DROP TABLE products_bundle__product_context');
$this->addSql('DROP TABLE products_bundle__product_translations');
$this->addSql('DROP TABLE products_bundle__product_type');
$this->addSql('DROP TABLE products_bundle__product_type_translations');
$this->addSql('ALTER TABLE configuration CHANGE name name VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE value value LONGTEXT DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE context CHANGE name name VARCHAR(128) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE address address VARCHAR(128) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE address2 address2 VARCHAR(128) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE postcode postcode VARCHAR(32) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE city city VARCHAR(128) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE phone phone VARCHAR(32) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE email email VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE website website VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE vat_number vat_number VARCHAR(32) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE siren siren VARCHAR(16) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE siret siret VARCHAR(16) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE ape ape VARCHAR(8) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE country CHANGE name name VARCHAR(128) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE iso_code iso_code VARCHAR(6) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE area_code area_code VARCHAR(6) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE country_state CHANGE name name VARCHAR(128) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE iso_code iso_code VARCHAR(6) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE country_translations CHANGE locale locale VARCHAR(8) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE field field VARCHAR(32) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE content content LONGTEXT DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE country_zone CHANGE name name VARCHAR(128) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE country_zone_translations CHANGE locale locale VARCHAR(8) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE field field VARCHAR(32) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE content content LONGTEXT DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE cron_job CHANGE name name VARCHAR(191) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE command command VARCHAR(1024) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE schedule schedule VARCHAR(191) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE description description VARCHAR(191) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE cron_report CHANGE output output LONGTEXT NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE error error LONGTEXT NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE currency CHANGE name name VARCHAR(64) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE iso_code iso_code VARCHAR(6) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE change_rate change_rate NUMERIC(20, 12) DEFAULT \'1.000000000000\' NOT NULL');
$this->addSql('ALTER TABLE ext_translations CHANGE locale locale VARCHAR(8) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE object_class object_class VARCHAR(191) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE field field VARCHAR(32) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE foreign_key foreign_key VARCHAR(64) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE content content LONGTEXT DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE file_manager CHANGE key_path key_path VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE original_filename original_filename LONGTEXT DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE mime_type mime_type VARCHAR(128) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE extension extension VARCHAR(10) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE language CHANGE name name VARCHAR(128) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE iso_code iso_code VARCHAR(3) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE locale locale VARCHAR(6) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE messenger_messages CHANGE body body LONGTEXT NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE headers headers LONGTEXT NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE queue_name queue_name VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE notification CHANGE object object LONGTEXT NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE render render LONGTEXT NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE profile CHANGE name name VARCHAR(64) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE roles roles LONGTEXT NOT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:json)\'');
$this->addSql('ALTER TABLE tax CHANGE name name VARCHAR(64) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE account_number account_number VARCHAR(32) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE tax_rule CHANGE name name VARCHAR(128) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE unit_measure CHANGE name name VARCHAR(40) NOT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE user CHANGE firstname firstname VARCHAR(32) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE lastname lastname VARCHAR(32) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE email email VARCHAR(128) NOT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE password password VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE token token VARCHAR(40) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE config config LONGTEXT DEFAULT NULL COLLATE `utf8mb4_unicode_ci` COMMENT \'(DC2Type:json)\'');
$this->addSql('ALTER TABLE user_login_log CHANGE ipv4 ipv4 VARCHAR(19) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, CHANGE ipv6 ipv6 VARCHAR(255) DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
}
}