[fix] made foreign keys non-nullable