vendor/bluue/recurring-invoices-bundle/migrations/Version20230622141703.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace RecurringInvoicesBundleMigrations;
  4. use Exception;
  5. use Doctrine\DBAL\Schema\Schema;
  6. use Doctrine\Migrations\AbstractMigration;
  7. final class Version20230622141703 extends AbstractMigration
  8. {
  9.     public function up(Schema $schema): void
  10.     {
  11.     }
  12.     public function down(Schema $schema): void
  13.     {
  14.     }
  15.     public function postUp(Schema $schema): void
  16.     {
  17.         parent::postUp($schema);
  18.         try {
  19.             $conn $this->connection->prepare("UPDATE `recurring_invoices_bundle__recurring_invoice_line` l SET l.quantity = '1.000000' WHERE l.quantity IS NULL AND l.is_pack = 1");
  20.             $conn->executeQuery();
  21.         } catch (Exception $e) {
  22.             dump($e);
  23.         }
  24.         shell_exec('bin/console do:fi:lo --append --group=recurring_invoices_bundle__maj_base_quantity');
  25.     }
  26. }