Umstellung Migrationen bzgl. Multi-Plattform-Support.

Zunächst MySQL, SQLite Statements integrieren.
This commit is contained in:
Marcel Diegelmann 2025-04-23 10:49:07 +02:00
parent a680e6e0b8
commit 3e1ea23819
3 changed files with 515 additions and 10 deletions

View file

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace App\Entity\Parts;
use ApiPlatform\Metadata\ApiProperty;
use App\Entity\Attachments\Attachment;
use App\Entity\Attachments\PartCustomStateAttachment;
use ApiPlatform\Doctrine\Common\Filter\DateFilterInterface;
use ApiPlatform\Doctrine\Orm\Filter\DateFilter;
@ -98,6 +99,11 @@ class PartCustomState extends AbstractPartsContainingDBElement
#[Groups(['part_custom_state:read', 'part_custom_state:write'])]
protected Collection $attachments;
#[ORM\ManyToOne(targetEntity: PartCustomStateAttachment::class)]
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
#[Groups(['part_custom_state:read', 'part_custom_state:write'])]
protected ?Attachment $master_picture_attachment = null;
/** @var Collection<int, PartCustomStateAttachment>
*/
#[Assert\Valid]