sql statement works on local box but not on server?

Was your migrations successful? Did you check the database to see if it
really is there?