fix test script for db