Fix database model
Fix message model