<?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 Version20231113080346 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 tax_rule_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_ABF78759232D562B (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 tax_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_5687791F232D562B (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('ALTER TABLE tax_rule_translations ADD CONSTRAINT FK_ABF78759232D562B FOREIGN KEY (object_id) REFERENCES tax_rule (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE tax_translations ADD CONSTRAINT FK_5687791F232D562B FOREIGN KEY (object_id) REFERENCES tax (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE products_bundle__declination CHANGE options options LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\'');
$this->addSql('ALTER TABLE team ADD position INT DEFAULT NULL');
$this->addSql('CREATE INDEX position ON team (position)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE tax_rule_translations DROP FOREIGN KEY FK_ABF78759232D562B');
$this->addSql('ALTER TABLE tax_translations DROP FOREIGN KEY FK_5687791F232D562B');
$this->addSql('DROP TABLE tax_rule_translations');
$this->addSql('DROP TABLE tax_translations');
$this->addSql('DROP INDEX position ON team');
$this->addSql('ALTER TABLE team DROP position');
$this->addSql('ALTER TABLE products_bundle__declination CHANGE options options LONGTEXT NOT NULL COLLATE `utf8mb4_bin`');
}
}