FOREIGN KEY constraint failed

I have run: pihole -r

There was an output error:
[✗] Unable to copy data from /etc/pihole/gravity.db to /etc/pihole/gravity.db_temp
Runtime error near line 16: FOREIGN KEY constraint failed (19)
[✗] Unable to create gravity database. Please try again later. If the problem persists, please contact support.

This post was helpful but did not fix my errors: