jhibberd/battleships — pull request #21 by sufendyc (2014-04-16 14:59:42+00:00)
Title: Added average time scoring in both single game and main scorer

Here is the migration script. Figured that we don't need the avg_time in the last run, just like the score, it only exists inside `best_score` object
```
import pymongo

db = pymongo.MongoClient().battleships # connect to local instance

SOME_MEANINGFUL_DEFAULT = 0

for bot in db.bots.find():
bot["avg_time"] = SOME_MEANINGFUL_DEFAULT
db.bots.save(bot)

for user in db.users.find():
# not all users have a best and last score
if "best_score" in user:
user["best_score"]["avg_time"] = SOME_MEANINGFUL_DEFAULT
db.users.save(user)
```