Added support of "Violates Foreign Key Constraint"

Updated the translator and added the support of "foreign key constraint violation". For this, this error type is needed here.
This commit is contained in:
Muhammad Amir Ejaz 2023-05-18 15:21:42 +05:00 committed by GitHub
parent f5837deef3
commit 566fa32435
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,4 +47,6 @@ var (
ErrPreloadNotAllowed = errors.New("preload is not allowed when count is used")
// ErrDuplicatedKey occurs when there is a unique key constraint violation
ErrDuplicatedKey = errors.New("duplicated key not allowed")
// ErrForeignKeyViolated occurs when there is a foreign key constraint violation
ErrForeignKeyViolated = errors.New("Violates foreign key constraint")
)