Coverage for migrations/2023_11_06_000001_drop_contests.py: 0%
10 statements
« prev ^ index » next coverage.py v7.3.2, created at 2024-11-05 04:22 +0000
« prev ^ index » next coverage.py v7.3.2, created at 2024-11-05 04:22 +0000
1import pymongo
3from . import MONGO_HOST, DATABASE
6def main():
7 client = pymongo.MongoClient(MONGO_HOST)
8 db = client[DATABASE]
9 collection = db['course']
10 collection.update_many({}, {'$unset': {'contests': 1}})
11 collection = db['problem']
12 collection.update_many({}, {'$unset': {'contests': 1}})
15main()