Add foreign_key for edge cases