I’m sorry if this comes across as being harsh, but IIRC I did let you know that many tables had foreign keys that referenced other tables and deleting stuff from the database was not an easy thing to do and hence not a good idea.
It might be a bit different if table schemas had “ON DELETE CASCADE” but they don’t because database size is not a problem
I also suggested you become familiar with the database tables, but apparently you have not yet done so.
If you go ahead and do things that you were strongly advised to not do by forum members including devs and those that wrote Discourse and would know better than anyone, you can at best expect to have “llttle quirks” like this happen and at worse trash the entire database.
Anyway what you need to do now is restore your latest backup.