<?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 Version20220720170931 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 marketing_cost_storage (id INT AUTO_INCREMENT NOT NULL, country_id INT DEFAULT NULL, product_id INT DEFAULT NULL, marketing_cost NUMERIC(10, 2) NOT NULL, INDEX IDX_D1671A3AF92F3E70 (country_id), INDEX IDX_D1671A3A4584665A (product_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE marketing_cost_storage ADD CONSTRAINT FK_D1671A3AF92F3E70 FOREIGN KEY (country_id) REFERENCES country (id)');
$this->addSql('ALTER TABLE marketing_cost_storage ADD CONSTRAINT FK_D1671A3A4584665A FOREIGN KEY (product_id) REFERENCES product (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE marketing_cost_storage');
}
}