store: Fixes to reflect the database model changes