<?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 Version20230727223011 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_payment ADD tax INT DEFAULT 0 NOT NULL, ADD tax_value INT DEFAULT 0 NOT NULL, ADD is_percentage_tax TINYINT(1) DEFAULT 0 NOT NULL');
$this->addSql('ALTER TABLE payment_method ADD tax_value INT DEFAULT 0 NOT NULL, ADD is_percentage_tax TINYINT(1) DEFAULT 0 NOT NULL, ADD tax_name VARCHAR(255) DEFAULT \'Impuesto\' NOT NULL');
$this->addSql('ALTER TABLE order_header ADD payments_tax INT DEFAULT 0 NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE order_payment DROP tax, DROP tax_value, DROP is_percentage_tax');
$this->addSql('ALTER TABLE payment_method DROP tax_value, DROP is_percentage_tax, DROP tax_name');
$this->addSql('ALTER TABLE order_header DROP payments_tax');
}
}