<?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 Version20220126212540 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 ozon_size (id INT AUTO_INCREMENT NOT NULL, product_id INT NOT NULL, weight INT NOT NULL, weight_unit VARCHAR(255) NOT NULL, width INT NOT NULL, height INT NOT NULL, depth INT NOT NULL, dimension_unit VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_7B8426C94584665A (product_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE ozon_size ADD CONSTRAINT FK_7B8426C94584665A 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 ozon_size');
}
}