<?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 Version20220201112425 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 configuration (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', context_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', name VARCHAR(255) NOT NULL, value LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_A5E2A5D76B00C1CF (context_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE context (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', currency_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)\', name VARCHAR(128) NOT NULL, address VARCHAR(128) DEFAULT NULL, address2 VARCHAR(128) DEFAULT NULL, postcode VARCHAR(32) DEFAULT NULL, city VARCHAR(128) DEFAULT NULL, phone VARCHAR(32) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, website VARCHAR(255) DEFAULT NULL, vat_number VARCHAR(32) DEFAULT NULL, siren VARCHAR(16) DEFAULT NULL, siret VARCHAR(16) DEFAULT NULL, ape VARCHAR(8) 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_E25D857E38248176 (currency_id), INDEX IDX_E25D857EF92F3E70 (country_id), INDEX IDX_E25D857E36126D7C (country_state_id), INDEX IDX_E25D857EB03A8386 (created_by_id), INDEX IDX_E25D857E896DBBDE (updated_by_id), INDEX IDX_E25D857EC76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE country (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', country_zone_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, iso_code VARCHAR(6) DEFAULT NULL, area_code VARCHAR(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_5373C966566067C6 (country_zone_id), INDEX IDX_5373C966B03A8386 (created_by_id), INDEX IDX_5373C966896DBBDE (updated_by_id), INDEX IDX_5373C966C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE country_state (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', country_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, iso_code VARCHAR(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_473C711F92F3E70 (country_id), INDEX IDX_473C711B03A8386 (created_by_id), INDEX IDX_473C711896DBBDE (updated_by_id), INDEX IDX_473C711C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE country_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_CA145695232D562B (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 country_zone (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_27D84BE3B03A8386 (created_by_id), INDEX IDX_27D84BE3896DBBDE (updated_by_id), INDEX IDX_27D84BE3C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE country_zone_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_D6532900232D562B (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 cron_job (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(191) NOT NULL, command VARCHAR(1024) NOT NULL, schedule VARCHAR(191) NOT NULL, description VARCHAR(191) NOT NULL, enabled TINYINT(1) NOT NULL, UNIQUE INDEX un_name (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE cron_report (id INT AUTO_INCREMENT NOT NULL, job_id INT DEFAULT NULL, run_at DATETIME NOT NULL, run_time DOUBLE PRECISION NOT NULL, exit_code INT NOT NULL, output LONGTEXT NOT NULL, error LONGTEXT NOT NULL, INDEX IDX_B6C6A7F5BE04EA9 (job_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE currency (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(64) NOT NULL, iso_code VARCHAR(6) NOT NULL, change_rate NUMERIC(20, 12) DEFAULT \'1\' NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, is_active TINYINT(1) NOT NULL, is_default TINYINT(1) NOT NULL, INDEX IDX_6956883FB03A8386 (created_by_id), INDEX IDX_6956883F896DBBDE (updated_by_id), INDEX IDX_6956883FC76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE ext_translations (id INT AUTO_INCREMENT NOT NULL, locale VARCHAR(8) NOT NULL, object_class VARCHAR(191) NOT NULL, field VARCHAR(32) NOT NULL, foreign_key VARCHAR(64) NOT NULL, content LONGTEXT DEFAULT NULL, INDEX translations_lookup_idx (locale, object_class, foreign_key), INDEX general_translations_lookup_idx (object_class, foreign_key), UNIQUE INDEX lookup_unique_idx (locale, object_class, field, foreign_key), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB ROW_FORMAT = DYNAMIC');
$this->addSql('CREATE TABLE file_manager (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', key_path VARCHAR(255) NOT NULL, original_filename LONGTEXT DEFAULT NULL, mime_type VARCHAR(128) NOT NULL, extension VARCHAR(10) DEFAULT NULL, size INT DEFAULT NULL, width INT DEFAULT NULL, height INT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE language (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, iso_code VARCHAR(3) NOT NULL, locale VARCHAR(6) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, is_active TINYINT(1) NOT NULL, is_default TINYINT(1) NOT NULL, INDEX IDX_D4DB71B5B03A8386 (created_by_id), INDEX IDX_D4DB71B5896DBBDE (updated_by_id), INDEX IDX_D4DB71B5C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE notification (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', user_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', object LONGTEXT NOT NULL, render LONGTEXT NOT NULL, viewed TINYINT(1) NOT NULL, readed TINYINT(1) NOT NULL, deleted TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_BF5476CAA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE profile (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', name VARCHAR(64) NOT NULL, roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE tax (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(64) NOT NULL, tax_rate NUMERIC(5, 2) NOT NULL, account_number VARCHAR(32) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_8E81BA76B03A8386 (created_by_id), INDEX IDX_8E81BA76896DBBDE (updated_by_id), INDEX IDX_8E81BA76C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE tax_rule (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_5A57A334B03A8386 (created_by_id), INDEX IDX_5A57A334896DBBDE (updated_by_id), INDEX IDX_5A57A334C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE tax_rule_country (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', tax_rule_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', tax_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', country_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_33D7534A3506A35B (tax_rule_id), INDEX IDX_33D7534AB2A824D8 (tax_id), INDEX IDX_33D7534AF92F3E70 (country_id), INDEX IDX_33D7534AB03A8386 (created_by_id), INDEX IDX_33D7534A896DBBDE (updated_by_id), INDEX IDX_33D7534AC76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE unit_measure (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)\', name VARCHAR(40) NOT NULL, quantity 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_D44E17E7727ACA70 (parent_id), INDEX IDX_D44E17E7B03A8386 (created_by_id), INDEX IDX_D44E17E7896DBBDE (updated_by_id), INDEX IDX_D44E17E7C76F1F52 (deleted_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE user (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', profile_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', language_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)\', firstname VARCHAR(32) NOT NULL, lastname VARCHAR(32) NOT NULL, email VARCHAR(128) NOT NULL, password VARCHAR(255) DEFAULT NULL, token VARCHAR(40) DEFAULT NULL, token_validity DATETIME DEFAULT NULL, config LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, is_active TINYINT(1) NOT NULL, INDEX IDX_8D93D649CCFA12B8 (profile_id), INDEX IDX_8D93D64982F1BAF4 (language_id), INDEX IDX_8D93D649B03A8386 (created_by_id), INDEX IDX_8D93D649896DBBDE (updated_by_id), INDEX IDX_8D93D649C76F1F52 (deleted_by_id), INDEX name (firstname, lastname), INDEX state (is_active, deleted_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE user_context (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', user_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', context_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', INDEX IDX_BA509B74A76ED395 (user_id), INDEX IDX_BA509B746B00C1CF (context_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE user_login_log (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', user_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ipv4 VARCHAR(19) DEFAULT NULL, ipv6 VARCHAR(255) DEFAULT NULL, is_login_valid TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_F18D121BA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE messenger_messages (id BIGINT AUTO_INCREMENT NOT NULL, body LONGTEXT NOT NULL, headers LONGTEXT NOT NULL, queue_name VARCHAR(255) NOT NULL, created_at DATETIME NOT NULL, available_at DATETIME NOT NULL, delivered_at DATETIME DEFAULT NULL, INDEX IDX_75EA56E016BA31DB (delivered_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE configuration ADD CONSTRAINT FK_A5E2A5D76B00C1CF FOREIGN KEY (context_id) REFERENCES context (id)');
$this->addSql('ALTER TABLE context ADD CONSTRAINT FK_E25D857E38248176 FOREIGN KEY (currency_id) REFERENCES currency (id)');
$this->addSql('ALTER TABLE context ADD CONSTRAINT FK_E25D857EF92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
$this->addSql('ALTER TABLE context ADD CONSTRAINT FK_E25D857E36126D7C FOREIGN KEY (country_state_id) REFERENCES country_state (id)');
$this->addSql('ALTER TABLE context ADD CONSTRAINT FK_E25D857EB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE context ADD CONSTRAINT FK_E25D857E896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE context ADD CONSTRAINT FK_E25D857EC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE country ADD CONSTRAINT FK_5373C966566067C6 FOREIGN KEY (country_zone_id) REFERENCES country_zone (id)');
$this->addSql('ALTER TABLE country ADD CONSTRAINT FK_5373C966B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE country ADD CONSTRAINT FK_5373C966896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE country ADD CONSTRAINT FK_5373C966C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE country_state ADD CONSTRAINT FK_473C711F92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
$this->addSql('ALTER TABLE country_state ADD CONSTRAINT FK_473C711B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE country_state ADD CONSTRAINT FK_473C711896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE country_state ADD CONSTRAINT FK_473C711C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE country_translations ADD CONSTRAINT FK_CA145695232D562B FOREIGN KEY (object_id) REFERENCES country (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE country_zone ADD CONSTRAINT FK_27D84BE3B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE country_zone ADD CONSTRAINT FK_27D84BE3896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE country_zone ADD CONSTRAINT FK_27D84BE3C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE country_zone_translations ADD CONSTRAINT FK_D6532900232D562B FOREIGN KEY (object_id) REFERENCES country_zone (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE cron_report ADD CONSTRAINT FK_B6C6A7F5BE04EA9 FOREIGN KEY (job_id) REFERENCES cron_job (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE currency ADD CONSTRAINT FK_6956883FB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE currency ADD CONSTRAINT FK_6956883F896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE currency ADD CONSTRAINT FK_6956883FC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE language ADD CONSTRAINT FK_D4DB71B5B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE language ADD CONSTRAINT FK_D4DB71B5896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE language ADD CONSTRAINT FK_D4DB71B5C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE notification ADD CONSTRAINT FK_BF5476CAA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE tax ADD CONSTRAINT FK_8E81BA76B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE tax ADD CONSTRAINT FK_8E81BA76896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE tax ADD CONSTRAINT FK_8E81BA76C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE tax_rule ADD CONSTRAINT FK_5A57A334B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE tax_rule ADD CONSTRAINT FK_5A57A334896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE tax_rule ADD CONSTRAINT FK_5A57A334C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE tax_rule_country ADD CONSTRAINT FK_33D7534A3506A35B FOREIGN KEY (tax_rule_id) REFERENCES tax_rule (id)');
$this->addSql('ALTER TABLE tax_rule_country ADD CONSTRAINT FK_33D7534AB2A824D8 FOREIGN KEY (tax_id) REFERENCES tax (id)');
$this->addSql('ALTER TABLE tax_rule_country ADD CONSTRAINT FK_33D7534AF92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
$this->addSql('ALTER TABLE tax_rule_country ADD CONSTRAINT FK_33D7534AB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE tax_rule_country ADD CONSTRAINT FK_33D7534A896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE tax_rule_country ADD CONSTRAINT FK_33D7534AC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE unit_measure ADD CONSTRAINT FK_D44E17E7727ACA70 FOREIGN KEY (parent_id) REFERENCES unit_measure (id)');
$this->addSql('ALTER TABLE unit_measure ADD CONSTRAINT FK_D44E17E7B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE unit_measure ADD CONSTRAINT FK_D44E17E7896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE unit_measure ADD CONSTRAINT FK_D44E17E7C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id)');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D64982F1BAF4 FOREIGN KEY (language_id) REFERENCES language (id)');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_context ADD CONSTRAINT FK_BA509B74A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user_context ADD CONSTRAINT FK_BA509B746B00C1CF FOREIGN KEY (context_id) REFERENCES context (id)');
$this->addSql('ALTER TABLE user_login_log ADD CONSTRAINT FK_F18D121BA76ED395 FOREIGN KEY (user_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 configuration DROP FOREIGN KEY FK_A5E2A5D76B00C1CF');
$this->addSql('ALTER TABLE user_context DROP FOREIGN KEY FK_BA509B746B00C1CF');
$this->addSql('ALTER TABLE context DROP FOREIGN KEY FK_E25D857EF92F3E70');
$this->addSql('ALTER TABLE country_state DROP FOREIGN KEY FK_473C711F92F3E70');
$this->addSql('ALTER TABLE country_translations DROP FOREIGN KEY FK_CA145695232D562B');
$this->addSql('ALTER TABLE tax_rule_country DROP FOREIGN KEY FK_33D7534AF92F3E70');
$this->addSql('ALTER TABLE context DROP FOREIGN KEY FK_E25D857E36126D7C');
$this->addSql('ALTER TABLE country DROP FOREIGN KEY FK_5373C966566067C6');
$this->addSql('ALTER TABLE country_zone_translations DROP FOREIGN KEY FK_D6532900232D562B');
$this->addSql('ALTER TABLE cron_report DROP FOREIGN KEY FK_B6C6A7F5BE04EA9');
$this->addSql('ALTER TABLE context DROP FOREIGN KEY FK_E25D857E38248176');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D64982F1BAF4');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649CCFA12B8');
$this->addSql('ALTER TABLE tax_rule_country DROP FOREIGN KEY FK_33D7534AB2A824D8');
$this->addSql('ALTER TABLE tax_rule_country DROP FOREIGN KEY FK_33D7534A3506A35B');
$this->addSql('ALTER TABLE unit_measure DROP FOREIGN KEY FK_D44E17E7727ACA70');
$this->addSql('ALTER TABLE context DROP FOREIGN KEY FK_E25D857EB03A8386');
$this->addSql('ALTER TABLE context DROP FOREIGN KEY FK_E25D857E896DBBDE');
$this->addSql('ALTER TABLE context DROP FOREIGN KEY FK_E25D857EC76F1F52');
$this->addSql('ALTER TABLE country DROP FOREIGN KEY FK_5373C966B03A8386');
$this->addSql('ALTER TABLE country DROP FOREIGN KEY FK_5373C966896DBBDE');
$this->addSql('ALTER TABLE country DROP FOREIGN KEY FK_5373C966C76F1F52');
$this->addSql('ALTER TABLE country_state DROP FOREIGN KEY FK_473C711B03A8386');
$this->addSql('ALTER TABLE country_state DROP FOREIGN KEY FK_473C711896DBBDE');
$this->addSql('ALTER TABLE country_state DROP FOREIGN KEY FK_473C711C76F1F52');
$this->addSql('ALTER TABLE country_zone DROP FOREIGN KEY FK_27D84BE3B03A8386');
$this->addSql('ALTER TABLE country_zone DROP FOREIGN KEY FK_27D84BE3896DBBDE');
$this->addSql('ALTER TABLE country_zone DROP FOREIGN KEY FK_27D84BE3C76F1F52');
$this->addSql('ALTER TABLE currency DROP FOREIGN KEY FK_6956883FB03A8386');
$this->addSql('ALTER TABLE currency DROP FOREIGN KEY FK_6956883F896DBBDE');
$this->addSql('ALTER TABLE currency DROP FOREIGN KEY FK_6956883FC76F1F52');
$this->addSql('ALTER TABLE language DROP FOREIGN KEY FK_D4DB71B5B03A8386');
$this->addSql('ALTER TABLE language DROP FOREIGN KEY FK_D4DB71B5896DBBDE');
$this->addSql('ALTER TABLE language DROP FOREIGN KEY FK_D4DB71B5C76F1F52');
$this->addSql('ALTER TABLE notification DROP FOREIGN KEY FK_BF5476CAA76ED395');
$this->addSql('ALTER TABLE tax DROP FOREIGN KEY FK_8E81BA76B03A8386');
$this->addSql('ALTER TABLE tax DROP FOREIGN KEY FK_8E81BA76896DBBDE');
$this->addSql('ALTER TABLE tax DROP FOREIGN KEY FK_8E81BA76C76F1F52');
$this->addSql('ALTER TABLE tax_rule DROP FOREIGN KEY FK_5A57A334B03A8386');
$this->addSql('ALTER TABLE tax_rule DROP FOREIGN KEY FK_5A57A334896DBBDE');
$this->addSql('ALTER TABLE tax_rule DROP FOREIGN KEY FK_5A57A334C76F1F52');
$this->addSql('ALTER TABLE tax_rule_country DROP FOREIGN KEY FK_33D7534AB03A8386');
$this->addSql('ALTER TABLE tax_rule_country DROP FOREIGN KEY FK_33D7534A896DBBDE');
$this->addSql('ALTER TABLE tax_rule_country DROP FOREIGN KEY FK_33D7534AC76F1F52');
$this->addSql('ALTER TABLE unit_measure DROP FOREIGN KEY FK_D44E17E7B03A8386');
$this->addSql('ALTER TABLE unit_measure DROP FOREIGN KEY FK_D44E17E7896DBBDE');
$this->addSql('ALTER TABLE unit_measure DROP FOREIGN KEY FK_D44E17E7C76F1F52');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649B03A8386');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649896DBBDE');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649C76F1F52');
$this->addSql('ALTER TABLE user_context DROP FOREIGN KEY FK_BA509B74A76ED395');
$this->addSql('ALTER TABLE user_login_log DROP FOREIGN KEY FK_F18D121BA76ED395');
$this->addSql('DROP TABLE configuration');
$this->addSql('DROP TABLE context');
$this->addSql('DROP TABLE country');
$this->addSql('DROP TABLE country_state');
$this->addSql('DROP TABLE country_translations');
$this->addSql('DROP TABLE country_zone');
$this->addSql('DROP TABLE country_zone_translations');
$this->addSql('DROP TABLE cron_job');
$this->addSql('DROP TABLE cron_report');
$this->addSql('DROP TABLE currency');
$this->addSql('DROP TABLE ext_translations');
$this->addSql('DROP TABLE file_manager');
$this->addSql('DROP TABLE language');
$this->addSql('DROP TABLE notification');
$this->addSql('DROP TABLE profile');
$this->addSql('DROP TABLE tax');
$this->addSql('DROP TABLE tax_rule');
$this->addSql('DROP TABLE tax_rule_country');
$this->addSql('DROP TABLE unit_measure');
$this->addSql('DROP TABLE user');
$this->addSql('DROP TABLE user_context');
$this->addSql('DROP TABLE user_login_log');
$this->addSql('DROP TABLE messenger_messages');
}
}