<?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 Version20220120064222 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 transaction (id INT AUTO_INCREMENT NOT NULL, deal_id INT DEFAULT NULL, report_id INT DEFAULT NULL, uniqid VARCHAR(255) NOT NULL, sales_gross INT DEFAULT NULL, sales_net INT DEFAULT NULL, commissions_gross INT DEFAULT NULL, commissions_net INT DEFAULT NULL, orders_net INT DEFAULT NULL, order_id VARCHAR(255) DEFAULT NULL, xid VARCHAR(255) DEFAULT NULL, email_id INT DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_723705D1F60E2305 (deal_id), INDEX IDX_723705D14BD2A4C0 (report_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE transaction ADD CONSTRAINT FK_723705D1F60E2305 FOREIGN KEY (deal_id) REFERENCES deal (id)');
$this->addSql('ALTER TABLE transaction ADD CONSTRAINT FK_723705D14BD2A4C0 FOREIGN KEY (report_id) REFERENCES report (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE transaction');
}
}