<?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 Version20240330180149 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 payment DROP CONSTRAINT fk_6d28840d8c03f15c');
$this->addSql('DROP INDEX idx_6d28840d8c03f15c');
$this->addSql('ALTER TABLE payment DROP employee_id');
$this->addSql('ALTER TABLE project_report ADD sales_bonus INT DEFAULT NULL');
$this->addSql('ALTER TABLE project_report ADD intermediary_commission INT DEFAULT NULL');
$this->addSql('ALTER TABLE project_report ADD profit INT DEFAULT NULL');
$this->addSql('ALTER TABLE project_report ADD income_tax INT DEFAULT NULL');
$this->addSql('ALTER TABLE project_report ADD sales_bonus_plan INT DEFAULT NULL');
$this->addSql('ALTER TABLE project_report ADD intermediary_commission_plan INT DEFAULT NULL');
$this->addSql('ALTER TABLE project_report ADD profit_plan INT DEFAULT NULL');
$this->addSql('ALTER TABLE project_report ADD income_tax_plan INT DEFAULT NULL');
$this->addSql('ALTER TABLE project_report ALTER cost_customer DROP DEFAULT');
$this->addSql('ALTER TABLE refill ALTER value DROP DEFAULT');
$this->addSql('ALTER TABLE refill ALTER value DROP NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE refill ALTER value SET DEFAULT \'0\'');
$this->addSql('ALTER TABLE refill ALTER value SET NOT NULL');
$this->addSql('ALTER TABLE payment ADD employee_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE payment ADD CONSTRAINT fk_6d28840d8c03f15c FOREIGN KEY (employee_id) REFERENCES employee (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX idx_6d28840d8c03f15c ON payment (employee_id)');
$this->addSql('ALTER TABLE project_report DROP sales_bonus');
$this->addSql('ALTER TABLE project_report DROP intermediary_commission');
$this->addSql('ALTER TABLE project_report DROP profit');
$this->addSql('ALTER TABLE project_report DROP income_tax');
$this->addSql('ALTER TABLE project_report DROP sales_bonus_plan');
$this->addSql('ALTER TABLE project_report DROP intermediary_commission_plan');
$this->addSql('ALTER TABLE project_report DROP profit_plan');
$this->addSql('ALTER TABLE project_report DROP income_tax_plan');
$this->addSql('ALTER TABLE project_report ALTER cost_customer SET DEFAULT 0');
}
}