DB error after migrating to v4 relating to violating foreign key constraints

Of course, as soon as I posted I made some progress on this. I can now tell that this isn’t really a Strapi issue at all but a data issue. Something I did in migrating the database broke the foreign keys. I don’t know how that happened because I dumped the whole table and imported the whole table - if anyone has specific recommendations for migrating postgres databases without breaking the foreign key links, I’d love to hear it because this is a pain to fix.