Updated database model and generated sql