<?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 Version20230226202225 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 seller_sale ADD seller_payment_discount_id INT DEFAULT NULL, ADD discount_value INT DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE seller_sale ADD CONSTRAINT FK_E7B205E58110BF07 FOREIGN KEY (seller_payment_discount_id) REFERENCES seller_payment_discount (id)');
$this->addSql('CREATE INDEX IDX_E7B205E58110BF07 ON seller_sale (seller_payment_discount_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE seller_sale DROP FOREIGN KEY FK_E7B205E58110BF07');
$this->addSql('DROP INDEX IDX_E7B205E58110BF07 ON seller_sale');
$this->addSql('ALTER TABLE seller_sale DROP seller_payment_discount_id, DROP discount_value');
}
}