<?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 Version20220420224458 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 payment_advance ADD created_by_id INT DEFAULT NULL, ADD updated_by_id INT DEFAULT NULL, ADD isActive TINYINT(1) DEFAULT NULL, ADD date DATETIME NOT NULL, ADD update_at DATETIME NOT NULL, ADD remaing_amount DOUBLE PRECISION NOT NULL');
$this->addSql('ALTER TABLE payment_advance ADD CONSTRAINT FK_FEC81519B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE payment_advance ADD CONSTRAINT FK_FEC81519896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_FEC81519B03A8386 ON payment_advance (created_by_id)');
$this->addSql('CREATE INDEX IDX_FEC81519896DBBDE ON payment_advance (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 payment_advance DROP FOREIGN KEY FK_FEC81519B03A8386');
$this->addSql('ALTER TABLE payment_advance DROP FOREIGN KEY FK_FEC81519896DBBDE');
$this->addSql('DROP INDEX IDX_FEC81519B03A8386 ON payment_advance');
$this->addSql('DROP INDEX IDX_FEC81519896DBBDE ON payment_advance');
$this->addSql('ALTER TABLE payment_advance DROP created_by_id, DROP updated_by_id, DROP isActive, DROP date, DROP update_at, DROP remaing_amount');
}
}