[api] adapt check script to work with OBS 2.3 and 2.4 database tables