<?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 Version20230906145539 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 child_tags ADD updated_by_id INT DEFAULT NULL, CHANGE number_to_buy number_to_buy INT DEFAULT 1');
$this->addSql('ALTER TABLE child_tags ADD CONSTRAINT FK_DA8D37D4896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id)');
$this->addSql('CREATE INDEX IDX_DA8D37D4896DBBDE ON child_tags (updated_by_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE child_tags DROP FOREIGN KEY FK_DA8D37D4896DBBDE');
$this->addSql('DROP INDEX IDX_DA8D37D4896DBBDE ON child_tags');
$this->addSql('ALTER TABLE child_tags DROP updated_by_id, CHANGE number_to_buy number_to_buy INT DEFAULT 1 NOT NULL');
}
}