You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was working on a short SQL script to remove PII from a db so that we could send it to others, but I noticed that removing data wasn't cascading to all the tables you'd expect. The reason is that foreign key constraints are missing in a few places. Going to list what I've found here. I'll go through and add the constraints when I can, and then remove the extra calls from my script to remove PII!
I'm sure there are plenty of other places where such constraints are missing. Might be worth it to just spend an hour combing through our tables and getting them cleaned up at some point.
The text was updated successfully, but these errors were encountered:
Brief description of problem/feature
I was working on a short SQL script to remove PII from a db so that we could send it to others, but I noticed that removing data wasn't cascading to all the tables you'd expect. The reason is that foreign key constraints are missing in a few places. Going to list what I've found here. I'll go through and add the constraints when I can, and then remove the extra calls from my script to remove PII!
user_role
table needsFOREIGN KEY(user_id) REFERENCES sidewalk_user(user_id)
user_role
table needsFOREIGN KEY(role_id) REFERENCES role(role_id)
user_current_region
table needsFOREIGN KEY(user_id) REFERENCES sidewalk_user(user_id)
user_current_region
table needsFOREIGN KEY(region_id) REFERENCES region(region_id)
label_point
table needsFOREIGN KEY(label_id) REFERENCES label(label_id)
validation_task_interaction
table needsFOREIGN KEY(mission_id) REFERENCES mission(mission_id)
I'm sure there are plenty of other places where such constraints are missing. Might be worth it to just spend an hour combing through our tables and getting them cleaned up at some point.
The text was updated successfully, but these errors were encountered: