messages saved to database

update to allow for messages to save to database, foreign key properly
assigned