<?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 Version20241126102642 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 taxation_deduction (id INT AUTO_INCREMENT NOT NULL, taxation_id INT NOT NULL, base_imponible NUMERIC(10, 2) NOT NULL, min_cont_estatal NUMERIC(10, 2) NOT NULL, min_cont_autonomico NUMERIC(10, 2) NOT NULL, cuota_estatal NUMERIC(10, 2) NOT NULL, cuota_autonomica NUMERIC(10, 2) NOT NULL, cuota_liquida_total NUMERIC(10, 2) NOT NULL, cuota_diferencial NUMERIC(10, 2) NOT NULL, hash VARCHAR(255) NOT NULL, cdate DATETIME NOT NULL, UNIQUE INDEX UNIQ_E4C2A644D1B862B8 (hash), UNIQUE INDEX UNIQ_E4C2A6442224E81F (taxation_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE taxation_deduction ADD CONSTRAINT FK_E4C2A6442224E81F FOREIGN KEY (taxation_id) REFERENCES taxation (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE taxation_deduction DROP FOREIGN KEY FK_E4C2A6442224E81F');
$this->addSql('DROP TABLE taxation_deduction');
}
}