fixed settings table migration and added foreign key of user id