mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-06 15:40:14 +02:00
Add unique index constraint for quiz_candidate with soft delete support
- Updated migration to include a unique index on `quiz_candidate` table that excludes soft-deleted records. - Adjusted `QuizCandidate` entity to reflect the new unique constraint with `deleted_at` condition.
This commit is contained in:
@@ -14,7 +14,7 @@ use Tvdt\Repository\QuizCandidateRepository;
|
||||
|
||||
#[Gedmo\SoftDeleteable]
|
||||
#[ORM\Entity(repositoryClass: QuizCandidateRepository::class)]
|
||||
#[ORM\UniqueConstraint(columns: ['candidate_id', 'quiz_id'])]
|
||||
#[ORM\UniqueConstraint(columns: ['candidate_id', 'quiz_id'], options: ['where' => 'deleted_at IS NULL'])]
|
||||
class QuizCandidate
|
||||
{
|
||||
use SoftDeleteableEntity;
|
||||
|
||||
Reference in New Issue
Block a user