<?php
declare(strict_types=1);
namespace ProductsBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230330131607 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE products_bundle__feature_context ADD created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD created_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, ADD updated_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, ADD deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE products_bundle__feature_context ADD CONSTRAINT FK_13B08B35B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__feature_context ADD CONSTRAINT FK_13B08B35896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__feature_context ADD CONSTRAINT FK_13B08B35C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_13B08B35B03A8386 ON products_bundle__feature_context (created_by_id)');
$this->addSql('CREATE INDEX IDX_13B08B35896DBBDE ON products_bundle__feature_context (updated_by_id)');
$this->addSql('CREATE INDEX IDX_13B08B35C76F1F52 ON products_bundle__feature_context (deleted_by_id)');
$this->addSql('CREATE INDEX deleted_at ON products_bundle__feature_context (deleted_at)');
$this->addSql('CREATE INDEX created_at ON products_bundle__feature_context (created_at)');
$this->addSql('CREATE INDEX updated_at ON products_bundle__feature_context (updated_at)');
$this->addSql('ALTER TABLE products_bundle__feature_value_context ADD created_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD updated_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD deleted_by_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:uuid)\', ADD created_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, ADD updated_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, ADD deleted_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE products_bundle__feature_value_context ADD CONSTRAINT FK_434334D2B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__feature_value_context ADD CONSTRAINT FK_434334D2896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE products_bundle__feature_value_context ADD CONSTRAINT FK_434334D2C76F1F52 FOREIGN KEY (deleted_by_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_434334D2B03A8386 ON products_bundle__feature_value_context (created_by_id)');
$this->addSql('CREATE INDEX IDX_434334D2896DBBDE ON products_bundle__feature_value_context (updated_by_id)');
$this->addSql('CREATE INDEX IDX_434334D2C76F1F52 ON products_bundle__feature_value_context (deleted_by_id)');
$this->addSql('CREATE INDEX deleted_at ON products_bundle__feature_value_context (deleted_at)');
$this->addSql('CREATE INDEX created_at ON products_bundle__feature_value_context (created_at)');
$this->addSql('CREATE INDEX updated_at ON products_bundle__feature_value_context (updated_at)');
$this->addSql('ALTER TABLE products_bundle__feature_context MODIFY created_at DATETIME NOT NULL, MODIFY updated_at DATETIME NOT NULL');
$this->addSql('ALTER TABLE products_bundle__feature_value_context MODIFY created_at DATETIME NOT NULL, MODIFY updated_at DATETIME NOT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE products_bundle__feature_context DROP FOREIGN KEY FK_13B08B35B03A8386');
$this->addSql('ALTER TABLE products_bundle__feature_context DROP FOREIGN KEY FK_13B08B35896DBBDE');
$this->addSql('ALTER TABLE products_bundle__feature_context DROP FOREIGN KEY FK_13B08B35C76F1F52');
$this->addSql('DROP INDEX IDX_13B08B35B03A8386 ON products_bundle__feature_context');
$this->addSql('DROP INDEX IDX_13B08B35896DBBDE ON products_bundle__feature_context');
$this->addSql('DROP INDEX IDX_13B08B35C76F1F52 ON products_bundle__feature_context');
$this->addSql('DROP INDEX deleted_at ON products_bundle__feature_context');
$this->addSql('DROP INDEX created_at ON products_bundle__feature_context');
$this->addSql('DROP INDEX updated_at ON products_bundle__feature_context');
$this->addSql('ALTER TABLE products_bundle__feature_context DROP created_by_id, DROP updated_by_id, DROP deleted_by_id, DROP created_at, DROP updated_at, DROP deleted_at');
$this->addSql('ALTER TABLE products_bundle__feature_value_context DROP FOREIGN KEY FK_434334D2B03A8386');
$this->addSql('ALTER TABLE products_bundle__feature_value_context DROP FOREIGN KEY FK_434334D2896DBBDE');
$this->addSql('ALTER TABLE products_bundle__feature_value_context DROP FOREIGN KEY FK_434334D2C76F1F52');
$this->addSql('DROP INDEX IDX_434334D2B03A8386 ON products_bundle__feature_value_context');
$this->addSql('DROP INDEX IDX_434334D2896DBBDE ON products_bundle__feature_value_context');
$this->addSql('DROP INDEX IDX_434334D2C76F1F52 ON products_bundle__feature_value_context');
$this->addSql('DROP INDEX deleted_at ON products_bundle__feature_value_context');
$this->addSql('DROP INDEX created_at ON products_bundle__feature_value_context');
$this->addSql('DROP INDEX updated_at ON products_bundle__feature_value_context');
$this->addSql('ALTER TABLE products_bundle__feature_value_context DROP created_by_id, DROP updated_by_id, DROP deleted_by_id, DROP created_at, DROP updated_at, DROP deleted_at');
}
}