Fix database scheme and implement a missing route