Revert "Revert "fix ForeignKeyConstraint for func_key_destination_extension""

This reverts commit 9feedecbd784292b17345a68ad707da616fe6798.
Revert "fix ForeignKeyConstraint for func_key_destination_extension"

This reverts commit b8a3c8c6b0c3262aad76251b904742d6b3280300.