test script migrates database