migrations/Version20240330180149.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20240330180149 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('ALTER TABLE payment DROP CONSTRAINT fk_6d28840d8c03f15c');
  19.         $this->addSql('DROP INDEX idx_6d28840d8c03f15c');
  20.         $this->addSql('ALTER TABLE payment DROP employee_id');
  21.         $this->addSql('ALTER TABLE project_report ADD sales_bonus INT DEFAULT NULL');
  22.         $this->addSql('ALTER TABLE project_report ADD intermediary_commission INT DEFAULT NULL');
  23.         $this->addSql('ALTER TABLE project_report ADD profit INT DEFAULT NULL');
  24.         $this->addSql('ALTER TABLE project_report ADD income_tax INT DEFAULT NULL');
  25.         $this->addSql('ALTER TABLE project_report ADD sales_bonus_plan INT DEFAULT NULL');
  26.         $this->addSql('ALTER TABLE project_report ADD intermediary_commission_plan INT DEFAULT NULL');
  27.         $this->addSql('ALTER TABLE project_report ADD profit_plan INT DEFAULT NULL');
  28.         $this->addSql('ALTER TABLE project_report ADD income_tax_plan INT DEFAULT NULL');
  29.         $this->addSql('ALTER TABLE project_report ALTER cost_customer DROP DEFAULT');
  30.         $this->addSql('ALTER TABLE refill ALTER value DROP DEFAULT');
  31.         $this->addSql('ALTER TABLE refill ALTER value DROP NOT NULL');
  32.     }
  33.     public function down(Schema $schema): void
  34.     {
  35.         // this down() migration is auto-generated, please modify it to your needs
  36.         $this->addSql('CREATE SCHEMA public');
  37.         $this->addSql('ALTER TABLE refill ALTER value SET DEFAULT \'0\'');
  38.         $this->addSql('ALTER TABLE refill ALTER value SET NOT NULL');
  39.         $this->addSql('ALTER TABLE payment ADD employee_id INT DEFAULT NULL');
  40.         $this->addSql('ALTER TABLE payment ADD CONSTRAINT fk_6d28840d8c03f15c FOREIGN KEY (employee_id) REFERENCES employee (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
  41.         $this->addSql('CREATE INDEX idx_6d28840d8c03f15c ON payment (employee_id)');
  42.         $this->addSql('ALTER TABLE project_report DROP sales_bonus');
  43.         $this->addSql('ALTER TABLE project_report DROP intermediary_commission');
  44.         $this->addSql('ALTER TABLE project_report DROP profit');
  45.         $this->addSql('ALTER TABLE project_report DROP income_tax');
  46.         $this->addSql('ALTER TABLE project_report DROP sales_bonus_plan');
  47.         $this->addSql('ALTER TABLE project_report DROP intermediary_commission_plan');
  48.         $this->addSql('ALTER TABLE project_report DROP profit_plan');
  49.         $this->addSql('ALTER TABLE project_report DROP income_tax_plan');
  50.         $this->addSql('ALTER TABLE project_report ALTER cost_customer SET DEFAULT 0');
  51.     }
  52. }