migrations/Version20230427125242.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 Version20230427125242 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_item DROP FOREIGN KEY FK_5017DCAE7E3C61F9');
$this->addSql('DROP INDEX IDX_5017DCAE7E3C61F9 ON market_item');
$this->addSql('ALTER TABLE market_item DROP is_pending, CHANGE owner_id buyer_id INT NOT NULL');
$this->addSql('ALTER TABLE market_item ADD CONSTRAINT FK_5017DCAE6C755722 FOREIGN KEY (buyer_id) REFERENCES theta_wallet (id)');
$this->addSql('CREATE INDEX IDX_5017DCAE6C755722 ON market_item (buyer_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE market_item DROP FOREIGN KEY FK_5017DCAE6C755722');
$this->addSql('DROP INDEX IDX_5017DCAE6C755722 ON market_item');
$this->addSql('ALTER TABLE market_item ADD is_pending TINYINT(1) NOT NULL, CHANGE buyer_id owner_id INT NOT NULL');
$this->addSql('ALTER TABLE market_item ADD CONSTRAINT FK_5017DCAE7E3C61F9 FOREIGN KEY (owner_id) REFERENCES theta_wallet (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('CREATE INDEX IDX_5017DCAE7E3C61F9 ON market_item (owner_id)');
}
}