<?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 Version20251002121731 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('ALTER TABLE order_product CHANGE price price NUMERIC(10, 2) NOT NULL');
$this->addSql('ALTER TABLE product_variant CHANGE discount discount NUMERIC(10, 2) DEFAULT \'0\', CHANGE unit_price unit_price NUMERIC(10, 2) DEFAULT \'0\', CHANGE total_price total_price NUMERIC(10, 2) DEFAULT \'0\'');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE order_product CHANGE price price DOUBLE PRECISION DEFAULT NULL');
$this->addSql('ALTER TABLE product_variant CHANGE discount discount DOUBLE PRECISION DEFAULT NULL, CHANGE unit_price unit_price DOUBLE PRECISION DEFAULT NULL, CHANGE total_price total_price DOUBLE PRECISION DEFAULT NULL');
}
}