Fix problem CASTing Integer Type in Trainings table.