<?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 Version20230221154143 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 shop_modules_bundle__module (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', platform_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', file_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)\', product_id VARCHAR(10) NOT NULL, name VARCHAR(255) NOT NULL, min_version VARCHAR(10) NOT NULL, max_version VARCHAR(10) NOT NULL, drive_link VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_F16FCD0AFFE6496F (platform_id), INDEX IDX_F16FCD0A93CB796C (file_id), INDEX IDX_F16FCD0AB03A8386 (created_by_id), INDEX IDX_F16FCD0A896DBBDE (updated_by_id), INDEX IDX_F16FCD0AC76F1F52 (deleted_by_id), INDEX name (name), INDEX min_version (min_version), INDEX max_version (max_version), 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 shop_modules_bundle__module_version (id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', module_id BINARY(16) NOT NULL COMMENT \'(DC2Type:uuid)\', file_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)\', date_version DATE NOT NULL, version VARCHAR(10) NOT NULL, min_version VARCHAR(10) NOT NULL, max_version VARCHAR(10) NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, deleted_at DATETIME DEFAULT NULL, INDEX IDX_7BA8145FAFC2B591 (module_id), INDEX IDX_7BA8145F93CB796C (file_id), INDEX IDX_7BA8145FB03A8386 (created_by_id), INDEX IDX_7BA8145F896DBBDE (updated_by_id), INDEX IDX_7BA8145FC76F1F52 (deleted_by_id), INDEX version (version), INDEX min_version (min_version), INDEX max_version (max_version), 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 shop_modules_bundle__platform (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_A9385050B03A8386 (created_by_id), INDEX IDX_A9385050896DBBDE (updated_by_id), INDEX IDX_A9385050C76F1F52 (deleted_by_id), INDEX name (name), 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 shop_modules_bundle__module ADD CONSTRAINT FK_F16FCD0AFFE6496F FOREIGN KEY (platform_id) REFERENCES shop_modules_bundle__platform (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__module ADD CONSTRAINT FK_F16FCD0A93CB796C FOREIGN KEY (file_id) REFERENCES file_manager (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__module ADD CONSTRAINT FK_F16FCD0AB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__module ADD CONSTRAINT FK_F16FCD0A896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__module ADD CONSTRAINT FK_F16FCD0AC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__module_version ADD CONSTRAINT FK_7BA8145FAFC2B591 FOREIGN KEY (module_id) REFERENCES shop_modules_bundle__module (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__module_version ADD CONSTRAINT FK_7BA8145F93CB796C FOREIGN KEY (file_id) REFERENCES file_manager (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__module_version ADD CONSTRAINT FK_7BA8145FB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__module_version ADD CONSTRAINT FK_7BA8145F896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__module_version ADD CONSTRAINT FK_7BA8145FC76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__platform ADD CONSTRAINT FK_A9385050B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__platform ADD CONSTRAINT FK_A9385050896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE shop_modules_bundle__platform ADD CONSTRAINT FK_A9385050C76F1F52 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 shop_modules_bundle__module DROP FOREIGN KEY FK_F16FCD0AFFE6496F');
$this->addSql('ALTER TABLE shop_modules_bundle__module DROP FOREIGN KEY FK_F16FCD0A93CB796C');
$this->addSql('ALTER TABLE shop_modules_bundle__module DROP FOREIGN KEY FK_F16FCD0AB03A8386');
$this->addSql('ALTER TABLE shop_modules_bundle__module DROP FOREIGN KEY FK_F16FCD0A896DBBDE');
$this->addSql('ALTER TABLE shop_modules_bundle__module DROP FOREIGN KEY FK_F16FCD0AC76F1F52');
$this->addSql('ALTER TABLE shop_modules_bundle__module_version DROP FOREIGN KEY FK_7BA8145FAFC2B591');
$this->addSql('ALTER TABLE shop_modules_bundle__module_version DROP FOREIGN KEY FK_7BA8145F93CB796C');
$this->addSql('ALTER TABLE shop_modules_bundle__module_version DROP FOREIGN KEY FK_7BA8145FB03A8386');
$this->addSql('ALTER TABLE shop_modules_bundle__module_version DROP FOREIGN KEY FK_7BA8145F896DBBDE');
$this->addSql('ALTER TABLE shop_modules_bundle__module_version DROP FOREIGN KEY FK_7BA8145FC76F1F52');
$this->addSql('ALTER TABLE shop_modules_bundle__platform DROP FOREIGN KEY FK_A9385050B03A8386');
$this->addSql('ALTER TABLE shop_modules_bundle__platform DROP FOREIGN KEY FK_A9385050896DBBDE');
$this->addSql('ALTER TABLE shop_modules_bundle__platform DROP FOREIGN KEY FK_A9385050C76F1F52');
$this->addSql('DROP TABLE shop_modules_bundle__module');
$this->addSql('DROP TABLE shop_modules_bundle__module_version');
$this->addSql('DROP TABLE shop_modules_bundle__platform');
}
}