<?php
declare(strict_types=1);
namespace RecurringInvoicesBundleMigrations;
use Exception;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230622141703 extends AbstractMigration
{
public function up(Schema $schema): void
{
}
public function down(Schema $schema): void
{
}
public function postUp(Schema $schema): void
{
parent::postUp($schema);
try {
$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");
$conn->executeQuery();
} catch (Exception $e) {
dump($e);
}
shell_exec('bin/console do:fi:lo --append --group=recurring_invoices_bundle__maj_base_quantity');
}
}