migrations/Version20230201025923.php line 1
<?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 Version20230201025923 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 market_sale_payout ADD market_item_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE market_sale_payout ADD CONSTRAINT FK_2E2005DB1BF9BADE FOREIGN KEY (market_item_id) REFERENCES market_item (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_2E2005DB1BF9BADE ON market_sale_payout (market_item_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE market_sale_payout DROP FOREIGN KEY FK_2E2005DB1BF9BADE');
$this->addSql('DROP INDEX UNIQ_2E2005DB1BF9BADE ON market_sale_payout');
$this->addSql('ALTER TABLE market_sale_payout DROP market_item_id');
}
}