Updated database schema to cover some of the scenarios