<?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 Version20221004075523 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 amazon_sales_item (id INT AUTO_INCREMENT NOT NULL, site_id INT DEFAULT NULL, file_id INT DEFAULT NULL, category VARCHAR(300) DEFAULT NULL, name VARCHAR(1400) NOT NULL, asin VARCHAR(10) NOT NULL, seller VARCHAR(200) DEFAULT NULL, date_shipped_at DATETIME NOT NULL, price DOUBLE PRECISION DEFAULT NULL, orders_net INT DEFAULT NULL, returns TINYINT(1) DEFAULT NULL, revenue DOUBLE PRECISION DEFAULT NULL, commissions DOUBLE PRECISION DEFAULT NULL, device VARCHAR(25) DEFAULT NULL, created_at DATETIME NOT NULL, INDEX IDX_CC9A6CD9F6BD1646 (site_id), INDEX IDX_CC9A6CD993CB796C (file_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE amazon_sales_item ADD CONSTRAINT FK_CC9A6CD9F6BD1646 FOREIGN KEY (site_id) REFERENCES site (id)');
$this->addSql('ALTER TABLE amazon_sales_item ADD CONSTRAINT FK_CC9A6CD993CB796C FOREIGN KEY (file_id) REFERENCES amazon_sales (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE amazon_sales_item');
}
}