migrations/Version20241114142754.php line 1

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace DoctrineMigrations;
  3. use Doctrine\DBAL\Schema\Schema;
  4. use Doctrine\Migrations\AbstractMigration;
  5. final class Version20241114142754 extends AbstractMigration
  6. {
  7.     public function getDescription(): string
  8.     {
  9.         return "Related Ref: https://synergyeffect.teamwork.com/app/tasks/40998692"
  10.             PHP_EOL
  11.             'Moving generative shipping & insurance data to persistanct storage.'
  12.             PHP_EOL
  13.             'The new requirement is to have ability to change fees but dont affect unpayed, already signed orders.';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql('ALTER TABLE invoice ADD shipping_sum DOUBLE PRECISION NOT NULL, ADD insurance_sum DOUBLE PRECISION NOT NULL');
  18.     }
  19.     public function down(Schema $schema): void
  20.     {
  21.         $this->addSql('ALTER TABLE invoice DROP shipping_sum, DROP insurance_sum');
  22.     }
  23. }