Fatal error: Uncaught PDOException: SQLSTATE[23503]: Foreign key violation: 7 ERROR: update or delete on table "parents" violates foreign key constraint "students_parent_id_fkey" on table "students"
DETAIL: Key (id)=(2) is still referenced from table "students". in /var/www/html/modules/parents/ParentRepository.php:91
Stack trace:
#0 /var/www/html/modules/parents/ParentRepository.php(91): PDOStatement->execute(Array)
#1 /var/www/html/modules/parents/delete.php(12): App\Modules\Parents\ParentRepository->delete(2)
#2 /var/www/html/public/index.php(33): require('/var/www/html/m...')
#3 {main}
thrown in /var/www/html/modules/parents/ParentRepository.php on line 91