fix database changelog script

#### Reviewers
@hmunfru 

#### Description
fix errors on changelog database migrations

### Test