Revert "Fixed foreign key NULL value"

This reverts commit 9aa83099b58afad0584decdfbf85f8e207c09ae1.