bug: fix constraint on customer table to allow soft-deletes (#6631)

This commit is contained in:
Mads Jensen
2024-03-08 16:43:11 +01:00
committed by GitHub
parent 4136b9da5f
commit 56504c99f0
3 changed files with 43 additions and 1 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ import { SoftDeletableEntity } from "../interfaces/models/soft-deletable-entity"
import { generateEntityId } from "../utils/generate-entity-id"
@Entity()
@Unique(["email", "has_account"])
@Index(["email", "has_account"], { unique: true, where: "deleted_at IS NULL" })
export class Customer extends SoftDeletableEntity {
@Index()
@Column()