<?php
declare(strict_types=1);
namespace SuppliersBundleMigrations;
use DateTime;
use Doctrine\DBAL\Schema\Schema;
use App\Services\ObjectSerialize;
use Symfony\Component\Uid\UuidV6;
use Doctrine\Migrations\AbstractMigration;
final class Version20230321143700 extends AbstractMigration
{
private ObjectSerialize $objectSerialize;
public function setObjectSerialize(ObjectSerialize $objectSerialize)
{
$this->objectSerialize = $objectSerialize;
}
public function up(Schema $schema): void
{
}
public function postUp(Schema $schema): void
{
parent::postUp($schema);
$this->connection->insert('configuration', [
'id' => (new UuidV6())->toBinary(),
'name' => 'suppliers_bundle__brand_reference_from_supplier_default_reference',
'value' => $this->objectSerialize->add((object) ['value' => '0']),
'created_at' => (new DateTime())->format('Y-m-d H:i:s'),
'updated_at' => (new DateTime())->format('Y-m-d H:i:s')
]);
}
public function down(Schema $schema): void
{
}
}