<?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 Version20211231083713 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_invoice ADD crediting_id INT UNSIGNED DEFAULT NULL');
$this->addSql('ALTER TABLE shop_invoice ADD CONSTRAINT FK_9356576E559D87B7 FOREIGN KEY (crediting_id) REFERENCES shop_invoice (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_9356576E559D87B7 ON shop_invoice (crediting_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE shop_invoice DROP FOREIGN KEY FK_9356576E559D87B7');
$this->addSql('DROP INDEX UNIQ_9356576E559D87B7 ON shop_invoice');
$this->addSql('ALTER TABLE shop_invoice DROP crediting_id');
}
}