We just recently discovered that the foreign key constraints are missing from our M2 database. This goes back to database backups as far back as May 2017. Has anyone else experienced this issue? We're concerned that we will have to backup to May and lose all work done over the last four months.
Have you tried running some of these commands that are recommended on stackoverflow? https://magento.stackexchange.com/a/167875/26
Some are with the official magento command line tool.
The last one is with the community created command line tool: https://github.com/netz98/n98-magerun2