<?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 Version20231110070457 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('CREATE TABLE interest_paidoff (id INT AUTO_INCREMENT NOT NULL, order_entity_id INT NOT NULL, created_by_id INT DEFAULT NULL, changed_by_id INT DEFAULT NULL, date_from DATE DEFAULT NULL, date_to DATE DEFAULT NULL, days INT NOT NULL, interest_total DOUBLE PRECISION NOT NULL, interest_investor DOUBLE PRECISION NOT NULL, interest_tax DOUBLE PRECISION NOT NULL, created DATETIME NOT NULL, changed DATETIME DEFAULT NULL, ip VARCHAR(255) DEFAULT NULL, INDEX IDX_494D555D3DA206A5 (order_entity_id), INDEX IDX_494D555DB03A8386 (created_by_id), INDEX IDX_494D555D828AD0A0 (changed_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE interest_paidoff ADD CONSTRAINT FK_494D555D3DA206A5 FOREIGN KEY (order_entity_id) REFERENCES `order` (id)');
$this->addSql('ALTER TABLE interest_paidoff ADD CONSTRAINT FK_494D555DB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE interest_paidoff ADD CONSTRAINT FK_494D555D828AD0A0 FOREIGN KEY (changed_by_id) REFERENCES user (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE interest_paidoff DROP FOREIGN KEY FK_494D555D3DA206A5');
$this->addSql('ALTER TABLE interest_paidoff DROP FOREIGN KEY FK_494D555DB03A8386');
$this->addSql('ALTER TABLE interest_paidoff DROP FOREIGN KEY FK_494D555D828AD0A0');
$this->addSql('DROP TABLE interest_paidoff');
}
}