<?php
declare(strict_types=1);
namespace SalesBundleMigrations;
use App\Services\ObjectSerialize;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
use Symfony\Component\Uid\UuidV6;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230213150000 extends AbstractMigration
{
private ObjectSerialize $objectSerialize;
public function setObjectSerialize(ObjectSerialize $objectSerialize)
{
$this->objectSerialize = $objectSerialize;
}
public function up(Schema $schema): void
{
}
public function down(Schema $schema): void
{
}
public function postUp(Schema $schema): void
{
parent::postUp($schema);
$now = (new \DateTime())->format('Y-m-d H:i:s');
$this->connection->insert('configuration', [
'id' => (new UuidV6())->toBinary(),
'name' => 'sales_bundle__automatic_delivery_note_for_invoice',
'context_id' => null,
'value' => $this->objectSerialize->add((object) ['value' => true]),
'created_at' => $now,
'updated_at' => $now
]);
}
}