add foreign key of user_id to the messages table to link the belongs_to and has_many relationship between users and has_many messages