<?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 Version20220802122508 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 invoice ADD sample_id INT DEFAULT NULL, CHANGE prepayment_sum prepayment_sum NUMERIC(10, 2) DEFAULT \'0\' NOT NULL');
$this->addSql('ALTER TABLE invoice ADD CONSTRAINT FK_906517441B1FEA20 FOREIGN KEY (sample_id) REFERENCES sample (id)');
$this->addSql('CREATE INDEX IDX_906517441B1FEA20 ON invoice (sample_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE invoice DROP FOREIGN KEY FK_906517441B1FEA20');
$this->addSql('DROP INDEX IDX_906517441B1FEA20 ON invoice');
$this->addSql('ALTER TABLE invoice DROP sample_id, CHANGE prepayment_sum prepayment_sum NUMERIC(10, 2) DEFAULT \'0.00\' NOT NULL');
}
}