<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20210810084837 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('ALTER TABLE shop_order_product_credit ADD categorie_id INT NOT NULL');
$this->addSql('ALTER TABLE shop_order_product_credit ADD CONSTRAINT FK_F530F3D7BCF5E72D FOREIGN KEY (categorie_id) REFERENCES shop_categorie (id)');
$this->addSql('CREATE INDEX IDX_F530F3D7BCF5E72D ON shop_order_product_credit (categorie_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE shop_order_product_credit DROP FOREIGN KEY FK_F530F3D7BCF5E72D');
$this->addSql('DROP INDEX IDX_F530F3D7BCF5E72D ON shop_order_product_credit');
$this->addSql('ALTER TABLE shop_order_product_credit DROP categorie_id');
}
}