[api] fix check_database script to work on virgin 2.3 database