Added checkpoints to database and logic to be able able to get checkpoints from the database.