<?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 Version20250418103055 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 dtb_base_info DROP site_kit_site_id, DROP site_kit_site_secret');
$this->addSql('ALTER TABLE dtb_cart CHANGE total_price total_price NUMERIC(12, 2) UNSIGNED DEFAULT \'0\' NOT NULL, CHANGE delivery_fee_total delivery_fee_total NUMERIC(12, 2) UNSIGNED DEFAULT \'0\' NOT NULL');
$this->addSql('ALTER TABLE dtb_cart_item CHANGE price price NUMERIC(12, 2) DEFAULT \'0\' NOT NULL');
$this->addSql('ALTER TABLE dtb_customer DROP plg_mailmagazine_flg, CHANGE buy_total buy_total NUMERIC(12, 2) UNSIGNED DEFAULT \'0\'');
$this->addSql('ALTER TABLE dtb_order CHANGE subtotal subtotal NUMERIC(12, 2) UNSIGNED DEFAULT \'0\' NOT NULL, CHANGE discount discount NUMERIC(12, 2) UNSIGNED DEFAULT \'0\' NOT NULL, CHANGE delivery_fee_total delivery_fee_total NUMERIC(12, 2) UNSIGNED DEFAULT \'0\' NOT NULL, CHANGE charge charge NUMERIC(12, 2) UNSIGNED DEFAULT \'0\' NOT NULL, CHANGE tax tax NUMERIC(12, 2) UNSIGNED DEFAULT \'0\' NOT NULL, CHANGE total total NUMERIC(12, 2) UNSIGNED DEFAULT \'0\' NOT NULL, CHANGE payment_total payment_total NUMERIC(12, 2) UNSIGNED DEFAULT \'0\' NOT NULL');
$this->addSql('ALTER TABLE dtb_order_item CHANGE price price NUMERIC(12, 2) DEFAULT \'0\' NOT NULL');
$this->addSql('ALTER TABLE dtb_payment CHANGE charge charge NUMERIC(12, 2) UNSIGNED DEFAULT \'0\'');
$this->addSql('ALTER TABLE dtb_product ADD author VARCHAR(255) DEFAULT NULL, ADD release_date DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime)\', ADD page_amount INT DEFAULT NULL, ADD plate_type VARCHAR(255) DEFAULT NULL, ADD meclib_url VARCHAR(255) DEFAULT NULL, ADD mediapal_url VARCHAR(255) DEFAULT NULL, ADD amazon_url VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE plg_coupon CHANGE discount_price discount_price NUMERIC(12, 2) UNSIGNED DEFAULT \'0\', CHANGE coupon_lower_limit coupon_lower_limit NUMERIC(12, 2) UNSIGNED DEFAULT \'0\'');
$this->addSql('ALTER TABLE plg_coupon_order CHANGE discount discount NUMERIC(12, 2) UNSIGNED 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 dtb_base_info ADD site_kit_site_id VARCHAR(255) DEFAULT NULL, ADD site_kit_site_secret VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE dtb_cart CHANGE total_price total_price NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\' NOT NULL, CHANGE delivery_fee_total delivery_fee_total NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\' NOT NULL');
$this->addSql('ALTER TABLE dtb_cart_item CHANGE price price NUMERIC(12, 2) DEFAULT \'0.00\' NOT NULL');
$this->addSql('ALTER TABLE dtb_customer ADD plg_mailmagazine_flg SMALLINT UNSIGNED DEFAULT 0, CHANGE buy_total buy_total NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\'');
$this->addSql('ALTER TABLE dtb_order CHANGE subtotal subtotal NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\' NOT NULL, CHANGE discount discount NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\' NOT NULL, CHANGE delivery_fee_total delivery_fee_total NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\' NOT NULL, CHANGE charge charge NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\' NOT NULL, CHANGE tax tax NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\' NOT NULL, CHANGE total total NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\' NOT NULL, CHANGE payment_total payment_total NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\' NOT NULL');
$this->addSql('ALTER TABLE dtb_order_item CHANGE price price NUMERIC(12, 2) DEFAULT \'0.00\' NOT NULL');
$this->addSql('ALTER TABLE dtb_payment CHANGE charge charge NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\'');
$this->addSql('ALTER TABLE dtb_product DROP author, DROP release_date, DROP page_amount, DROP plate_type, DROP meclib_url, DROP mediapal_url, DROP amazon_url');
$this->addSql('ALTER TABLE plg_coupon CHANGE discount_price discount_price NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\', CHANGE coupon_lower_limit coupon_lower_limit NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\'');
$this->addSql('ALTER TABLE plg_coupon_order CHANGE discount discount NUMERIC(12, 2) UNSIGNED DEFAULT \'0.00\' NOT NULL');
}
}