Add settings property back to the model class
Fix the foreign key definition