Make in-memory database work for test configuration