Open squeaky-pl opened 2 years ago
It looks like they were dropped on purpose https://github.com/closeio/sync-engine/blob/9022236c98ca7abdef67062a38a7a295c498b6e0/migrations/versions/225_drop_messagecategory_foreign_keys.py#L20
The commit that deletes them is this one: https://github.com/closeio/sync-engine/commit/ff8b0bd749ac71f2c8c52430ccb8d3707485a499
Currently the table looks like this:
Notice that there are no foreign key constraints on
message_id
andcategory_id
columns. This can lead to to data corruption and exceptions on Python side. We should investigate if they were omitted on purpose. If not we should add them.