<?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 Version20221012082148 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_bundle__product_supplier (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', product_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', declination_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', supplier_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)\', reference VARCHAR(128) DEFAULT NULL, wholesale_price NUMERIC(20, 6) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, is_default TINYINT(1) NOT NULL, INDEX IDX_FCE3DD2F4584665A (product_id), INDEX IDX_FCE3DD2F9941A932 (declination_id), INDEX IDX_FCE3DD2F2ADD6D8C (supplier_id), INDEX IDX_FCE3DD2FB03A8386 (created_by_id), INDEX IDX_FCE3DD2F896DBBDE (updated_by_id), INDEX IDX_FCE3DD2FC76F1F52 (deleted_by_id), INDEX reference (reference), INDEX wholesale_price (wholesale_price), INDEX is_default (is_default), INDEX deleted_at (deleted_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE suppliers_bundle__supplier (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', country_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', country_state_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', supplier_type_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, city VARCHAR(128) DEFAULT NULL, postcode VARCHAR(32) DEFAULT NULL, contact_name VARCHAR(255) DEFAULT NULL, address VARCHAR(255) DEFAULT NULL, address2 VARCHAR(255) DEFAULT NULL, vat_number VARCHAR(32) DEFAULT NULL, phone VARCHAR(32) DEFAULT NULL, mobile_phone VARCHAR(32) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, website VARCHAR(255) DEFAULT NULL, note LONGTEXT DEFAULT NULL, free_of_charge NUMERIC(20, 6) DEFAULT NULL, ape VARCHAR(8) DEFAULT NULL, siret VARCHAR(25) DEFAULT NULL, rib VARCHAR(50) DEFAULT NULL, iban VARCHAR(34) DEFAULT NULL, bic VARCHAR(11) DEFAULT NULL, payment_method VARCHAR(255) DEFAULT NULL, bank_name VARCHAR(255) DEFAULT NULL, activity VARCHAR(255) DEFAULT NULL, reference VARCHAR(128) DEFAULT NULL, accounting_account VARCHAR(128) DEFAULT NULL, customer_number VARCHAR(128) DEFAULT NULL, minimum_order NUMERIC(20, 6) DEFAULT NULL, exemption TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, is_active TINYINT(1) DEFAULT 1 NOT NULL, INDEX IDX_DC54A5DAF92F3E70 (country_id), INDEX IDX_DC54A5DA36126D7C (country_state_id), INDEX IDX_DC54A5DA4429F88C (supplier_type_id), INDEX IDX_DC54A5DAB03A8386 (created_by_id), INDEX IDX_DC54A5DA896DBBDE (updated_by_id), INDEX IDX_DC54A5DAC76F1F52 (deleted_by_id), INDEX name (name), INDEX reference (reference), INDEX activity (activity), INDEX city (city), INDEX is_active (is_active), INDEX deleted_at (deleted_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE suppliers_bundle__supplier_address (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', supplier_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', country_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', country_state_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)\', alias VARCHAR(255) DEFAULT NULL, address VARCHAR(255) DEFAULT NULL, address2 VARCHAR(255) DEFAULT NULL, city VARCHAR(128) DEFAULT NULL, postcode VARCHAR(32) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_2052C0582ADD6D8C (supplier_id), INDEX IDX_2052C058F92F3E70 (country_id), INDEX IDX_2052C05836126D7C (country_state_id), INDEX IDX_2052C058B03A8386 (created_by_id), INDEX IDX_2052C058896DBBDE (updated_by_id), INDEX IDX_2052C058C76F1F52 (deleted_by_id), INDEX deleted_at (deleted_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE suppliers_bundle__supplier_contact (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', supplier_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)\', firstname VARCHAR(128) DEFAULT NULL, lastname VARCHAR(128) DEFAULT NULL, phone VARCHAR(32) DEFAULT NULL, mobile_phone VARCHAR(32) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, fax VARCHAR(255) DEFAULT NULL, work_post VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_617E49E12ADD6D8C (supplier_id), INDEX IDX_617E49E1B03A8386 (created_by_id), INDEX IDX_617E49E1896DBBDE (updated_by_id), INDEX IDX_617E49E1C76F1F52 (deleted_by_id), INDEX deleted_at (deleted_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE suppliers_bundle__supplier_context (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', supplier_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', context_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', INDEX IDX_CF412AA72ADD6D8C (supplier_id), INDEX IDX_CF412AA76B00C1CF (context_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE suppliers_bundle__supplier_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)\', name VARCHAR(128) NOT NULL, number INT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, is_active TINYINT(1) DEFAULT 1 NOT NULL, INDEX IDX_2E33A582B03A8386 (created_by_id), INDEX IDX_2E33A582896DBBDE (updated_by_id), INDEX IDX_2E33A582C76F1F52 (deleted_by_id), INDEX name (name), INDEX is_active (is_active), INDEX deleted_at (deleted_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE suppliers_bundle__supplier_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_5C93F504232D562B (object_id), FULLTEXT INDEX content (content), 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 suppliers_orders_bundle__receipt_note (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', supplier_order_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', context_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', validated_by_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)\', reference VARCHAR(128) DEFAULT NULL, options LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', validated_at DATETIME DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_7D7418211605B9 (supplier_order_id), INDEX IDX_7D7418216B00C1CF (context_id), INDEX IDX_7D741821C69DE5E5 (validated_by_id), INDEX IDX_7D741821B03A8386 (created_by_id), INDEX IDX_7D741821896DBBDE (updated_by_id), INDEX IDX_7D741821C76F1F52 (deleted_by_id), INDEX reference (reference), INDEX deleted_at (deleted_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE suppliers_orders_bundle__receipt_note_line (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', receipt_note_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', supplier_order_line_id BINARY(16) NOT 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)\', stock_location_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', warehouse_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', location_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', sub_location_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', date_type_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', quantity NUMERIC(20, 6) DEFAULT NULL, quantity_received NUMERIC(20, 6) DEFAULT NULL, options LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', supplier_reference VARCHAR(255) DEFAULT NULL, wholesale_price NUMERIC(20, 6) DEFAULT NULL, price NUMERIC(20, 6) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, date DATETIME DEFAULT NULL, batch_number VARCHAR(255) DEFAULT NULL, INDEX IDX_2C547A1E35A7ADAB (receipt_note_id), INDEX IDX_2C547A1EA9DC5CCE (supplier_order_line_id), INDEX IDX_2C547A1E727ACA70 (parent_id), INDEX IDX_2C547A1EB03A8386 (created_by_id), INDEX IDX_2C547A1E896DBBDE (updated_by_id), INDEX IDX_2C547A1EC76F1F52 (deleted_by_id), INDEX IDX_2C547A1ED98387BA (stock_location_id), INDEX IDX_2C547A1E5080ECDE (warehouse_id), INDEX IDX_2C547A1E64D218E (location_id), INDEX IDX_2C547A1EE3B45410 (sub_location_id), INDEX IDX_2C547A1EFCAB8B6E (date_type_id), INDEX deleted_at (deleted_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE suppliers_orders_bundle__supplier_order (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', context_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', supplier_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', currency_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)\', validated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', currency_change_rate NUMERIC(20, 12) NOT NULL, reference VARCHAR(128) DEFAULT NULL, total_amount NUMERIC(20, 6) DEFAULT NULL, internal_reference VARCHAR(255) DEFAULT NULL, external_reference VARCHAR(255) DEFAULT NULL, internal_note LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, validated_at DATETIME DEFAULT NULL, INDEX IDX_E63ACA816B00C1CF (context_id), INDEX IDX_E63ACA812ADD6D8C (supplier_id), INDEX IDX_E63ACA8138248176 (currency_id), INDEX IDX_E63ACA81B03A8386 (created_by_id), INDEX IDX_E63ACA81896DBBDE (updated_by_id), INDEX IDX_E63ACA81C76F1F52 (deleted_by_id), INDEX IDX_E63ACA81C69DE5E5 (validated_by_id), INDEX reference (reference), INDEX internal_reference (internal_reference), INDEX external_reference (external_reference), INDEX total_amount (total_amount), INDEX deleted_at (deleted_at), INDEX validated_at (validated_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE suppliers_orders_bundle__supplier_order_line (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', supplier_order_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', product_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', declination_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)\', supplier_reference VARCHAR(255) DEFAULT NULL, wholesale_price NUMERIC(20, 6) DEFAULT NULL, quantity NUMERIC(20, 6) DEFAULT NULL, quantity_receipted NUMERIC(20, 6) DEFAULT NULL, position INT NOT NULL, options LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', total_amount NUMERIC(20, 6) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_389F67811605B9 (supplier_order_id), INDEX IDX_389F67814584665A (product_id), INDEX IDX_389F67819941A932 (declination_id), INDEX IDX_389F6781B03A8386 (created_by_id), INDEX IDX_389F6781896DBBDE (updated_by_id), INDEX IDX_389F6781C76F1F52 (deleted_by_id), INDEX deleted_at (deleted_at), INDEX created_at (created_at), INDEX updated_at (updated_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier ADD CONSTRAINT FK_FCE3DD2F4584665A FOREIGN KEY (product_id) REFERENCES products_bundle__product (id)');
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier ADD CONSTRAINT FK_FCE3DD2F9941A932 FOREIGN KEY (declination_id) REFERENCES products_bundle__declination (id)');
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier ADD CONSTRAINT FK_FCE3DD2F2ADD6D8C FOREIGN KEY (supplier_id) REFERENCES suppliers_bundle__supplier (id)');
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier ADD CONSTRAINT FK_FCE3DD2FB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier ADD CONSTRAINT FK_FCE3DD2F896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier ADD CONSTRAINT FK_FCE3DD2FC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier ADD CONSTRAINT FK_DC54A5DAF92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier ADD CONSTRAINT FK_DC54A5DA36126D7C FOREIGN KEY (country_state_id) REFERENCES country_state (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier ADD CONSTRAINT FK_DC54A5DA4429F88C FOREIGN KEY (supplier_type_id) REFERENCES suppliers_bundle__supplier_type (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier ADD CONSTRAINT FK_DC54A5DAB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier ADD CONSTRAINT FK_DC54A5DA896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier ADD CONSTRAINT FK_DC54A5DAC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address ADD CONSTRAINT FK_2052C0582ADD6D8C FOREIGN KEY (supplier_id) REFERENCES suppliers_bundle__supplier (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address ADD CONSTRAINT FK_2052C058F92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address ADD CONSTRAINT FK_2052C05836126D7C FOREIGN KEY (country_state_id) REFERENCES country_state (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address ADD CONSTRAINT FK_2052C058B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address ADD CONSTRAINT FK_2052C058896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address ADD CONSTRAINT FK_2052C058C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_contact ADD CONSTRAINT FK_617E49E12ADD6D8C FOREIGN KEY (supplier_id) REFERENCES suppliers_bundle__supplier (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_contact ADD CONSTRAINT FK_617E49E1B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_contact ADD CONSTRAINT FK_617E49E1896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_contact ADD CONSTRAINT FK_617E49E1C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_context ADD CONSTRAINT FK_CF412AA72ADD6D8C FOREIGN KEY (supplier_id) REFERENCES suppliers_bundle__supplier (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_context ADD CONSTRAINT FK_CF412AA76B00C1CF FOREIGN KEY (context_id) REFERENCES context (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_type ADD CONSTRAINT FK_2E33A582B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_type ADD CONSTRAINT FK_2E33A582896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_type ADD CONSTRAINT FK_2E33A582C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_type_translations ADD CONSTRAINT FK_5C93F504232D562B FOREIGN KEY (object_id) REFERENCES suppliers_bundle__supplier_type (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note ADD CONSTRAINT FK_7D7418211605B9 FOREIGN KEY (supplier_order_id) REFERENCES suppliers_orders_bundle__supplier_order (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note ADD CONSTRAINT FK_7D7418216B00C1CF FOREIGN KEY (context_id) REFERENCES context (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note ADD CONSTRAINT FK_7D741821C69DE5E5 FOREIGN KEY (validated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note ADD CONSTRAINT FK_7D741821B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note ADD CONSTRAINT FK_7D741821896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note ADD CONSTRAINT FK_7D741821C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line ADD CONSTRAINT FK_2C547A1E35A7ADAB FOREIGN KEY (receipt_note_id) REFERENCES suppliers_orders_bundle__receipt_note (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line ADD CONSTRAINT FK_2C547A1EA9DC5CCE FOREIGN KEY (supplier_order_line_id) REFERENCES suppliers_orders_bundle__supplier_order_line (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line ADD CONSTRAINT FK_2C547A1E727ACA70 FOREIGN KEY (parent_id) REFERENCES suppliers_orders_bundle__receipt_note_line (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line ADD CONSTRAINT FK_2C547A1EB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line ADD CONSTRAINT FK_2C547A1E896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line ADD CONSTRAINT FK_2C547A1EC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line ADD CONSTRAINT FK_2C547A1ED98387BA FOREIGN KEY (stock_location_id) REFERENCES stocks_bundle__stock_location (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line ADD CONSTRAINT FK_2C547A1E5080ECDE FOREIGN KEY (warehouse_id) REFERENCES stocks_bundle__warehouse (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line ADD CONSTRAINT FK_2C547A1E64D218E FOREIGN KEY (location_id) REFERENCES stocks_bundle__location (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line ADD CONSTRAINT FK_2C547A1EE3B45410 FOREIGN KEY (sub_location_id) REFERENCES stocks_bundle__sub_location (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line ADD CONSTRAINT FK_2C547A1EFCAB8B6E FOREIGN KEY (date_type_id) REFERENCES stocks_bundle__date_type (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order ADD CONSTRAINT FK_E63ACA816B00C1CF FOREIGN KEY (context_id) REFERENCES context (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order ADD CONSTRAINT FK_E63ACA812ADD6D8C FOREIGN KEY (supplier_id) REFERENCES suppliers_bundle__supplier (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order ADD CONSTRAINT FK_E63ACA8138248176 FOREIGN KEY (currency_id) REFERENCES currency (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order ADD CONSTRAINT FK_E63ACA81B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order ADD CONSTRAINT FK_E63ACA81896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order ADD CONSTRAINT FK_E63ACA81C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order ADD CONSTRAINT FK_E63ACA81C69DE5E5 FOREIGN KEY (validated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line ADD CONSTRAINT FK_389F67811605B9 FOREIGN KEY (supplier_order_id) REFERENCES suppliers_orders_bundle__supplier_order (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line ADD CONSTRAINT FK_389F67814584665A FOREIGN KEY (product_id) REFERENCES products_bundle__product (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line ADD CONSTRAINT FK_389F67819941A932 FOREIGN KEY (declination_id) REFERENCES products_bundle__declination (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line ADD CONSTRAINT FK_389F6781B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line ADD CONSTRAINT FK_389F6781896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line ADD CONSTRAINT FK_389F6781C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier DROP FOREIGN KEY FK_FCE3DD2F4584665A');
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier DROP FOREIGN KEY FK_FCE3DD2F9941A932');
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier DROP FOREIGN KEY FK_FCE3DD2F2ADD6D8C');
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier DROP FOREIGN KEY FK_FCE3DD2FB03A8386');
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier DROP FOREIGN KEY FK_FCE3DD2F896DBBDE');
$this->addSql('ALTER TABLE suppliers_bundle__product_supplier DROP FOREIGN KEY FK_FCE3DD2FC76F1F52');
$this->addSql('ALTER TABLE suppliers_bundle__supplier DROP FOREIGN KEY FK_DC54A5DAF92F3E70');
$this->addSql('ALTER TABLE suppliers_bundle__supplier DROP FOREIGN KEY FK_DC54A5DA36126D7C');
$this->addSql('ALTER TABLE suppliers_bundle__supplier DROP FOREIGN KEY FK_DC54A5DA4429F88C');
$this->addSql('ALTER TABLE suppliers_bundle__supplier DROP FOREIGN KEY FK_DC54A5DAB03A8386');
$this->addSql('ALTER TABLE suppliers_bundle__supplier DROP FOREIGN KEY FK_DC54A5DA896DBBDE');
$this->addSql('ALTER TABLE suppliers_bundle__supplier DROP FOREIGN KEY FK_DC54A5DAC76F1F52');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address DROP FOREIGN KEY FK_2052C0582ADD6D8C');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address DROP FOREIGN KEY FK_2052C058F92F3E70');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address DROP FOREIGN KEY FK_2052C05836126D7C');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address DROP FOREIGN KEY FK_2052C058B03A8386');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address DROP FOREIGN KEY FK_2052C058896DBBDE');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_address DROP FOREIGN KEY FK_2052C058C76F1F52');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_contact DROP FOREIGN KEY FK_617E49E12ADD6D8C');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_contact DROP FOREIGN KEY FK_617E49E1B03A8386');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_contact DROP FOREIGN KEY FK_617E49E1896DBBDE');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_contact DROP FOREIGN KEY FK_617E49E1C76F1F52');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_context DROP FOREIGN KEY FK_CF412AA72ADD6D8C');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_context DROP FOREIGN KEY FK_CF412AA76B00C1CF');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_type DROP FOREIGN KEY FK_2E33A582B03A8386');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_type DROP FOREIGN KEY FK_2E33A582896DBBDE');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_type DROP FOREIGN KEY FK_2E33A582C76F1F52');
$this->addSql('ALTER TABLE suppliers_bundle__supplier_type_translations DROP FOREIGN KEY FK_5C93F504232D562B');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note DROP FOREIGN KEY FK_7D7418211605B9');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note DROP FOREIGN KEY FK_7D7418216B00C1CF');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note DROP FOREIGN KEY FK_7D741821C69DE5E5');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note DROP FOREIGN KEY FK_7D741821B03A8386');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note DROP FOREIGN KEY FK_7D741821896DBBDE');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note DROP FOREIGN KEY FK_7D741821C76F1F52');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line DROP FOREIGN KEY FK_2C547A1E35A7ADAB');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line DROP FOREIGN KEY FK_2C547A1EA9DC5CCE');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line DROP FOREIGN KEY FK_2C547A1E727ACA70');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line DROP FOREIGN KEY FK_2C547A1EB03A8386');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line DROP FOREIGN KEY FK_2C547A1E896DBBDE');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line DROP FOREIGN KEY FK_2C547A1EC76F1F52');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line DROP FOREIGN KEY FK_2C547A1ED98387BA');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line DROP FOREIGN KEY FK_2C547A1E5080ECDE');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line DROP FOREIGN KEY FK_2C547A1E64D218E');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line DROP FOREIGN KEY FK_2C547A1EE3B45410');
$this->addSql('ALTER TABLE suppliers_orders_bundle__receipt_note_line DROP FOREIGN KEY FK_2C547A1EFCAB8B6E');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order DROP FOREIGN KEY FK_E63ACA816B00C1CF');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order DROP FOREIGN KEY FK_E63ACA812ADD6D8C');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order DROP FOREIGN KEY FK_E63ACA8138248176');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order DROP FOREIGN KEY FK_E63ACA81B03A8386');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order DROP FOREIGN KEY FK_E63ACA81896DBBDE');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order DROP FOREIGN KEY FK_E63ACA81C76F1F52');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order DROP FOREIGN KEY FK_E63ACA81C69DE5E5');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line DROP FOREIGN KEY FK_389F67811605B9');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line DROP FOREIGN KEY FK_389F67814584665A');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line DROP FOREIGN KEY FK_389F67819941A932');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line DROP FOREIGN KEY FK_389F6781B03A8386');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line DROP FOREIGN KEY FK_389F6781896DBBDE');
$this->addSql('ALTER TABLE suppliers_orders_bundle__supplier_order_line DROP FOREIGN KEY FK_389F6781C76F1F52');
$this->addSql('DROP TABLE suppliers_bundle__product_supplier');
$this->addSql('DROP TABLE suppliers_bundle__supplier');
$this->addSql('DROP TABLE suppliers_bundle__supplier_address');
$this->addSql('DROP TABLE suppliers_bundle__supplier_contact');
$this->addSql('DROP TABLE suppliers_bundle__supplier_context');
$this->addSql('DROP TABLE suppliers_bundle__supplier_type');
$this->addSql('DROP TABLE suppliers_bundle__supplier_type_translations');
$this->addSql('DROP TABLE suppliers_orders_bundle__receipt_note');
$this->addSql('DROP TABLE suppliers_orders_bundle__receipt_note_line');
$this->addSql('DROP TABLE suppliers_orders_bundle__supplier_order');
$this->addSql('DROP TABLE suppliers_orders_bundle__supplier_order_line');
}
}