Wouldn't the best solution be to set up on your game migration an onDelete effect ? Like cascade ? I'm making the assumption that truncate would work in that case though. Otherwise it feels like a hack because of the migration are not 'good enough'.
Hi Povilas. I have a project where I am making use of this feature (disabling and enabling FK checks) in the code. I still feel its not the best way or not safe. Once you disable the check, the entire DB is affected meaning the foreign key constraint can be violated somewhere in the database (since the checking is disabled). It would've been better if we could disable the check on specific table(s) and not at DB level. I haven't explored this yet but it would be nice to have this e.g. passing table(s) name as arguments