diff options
Diffstat (limited to 'pysite/migrations/tables/code_jam_teams')
| -rw-r--r-- | pysite/migrations/tables/code_jam_teams/__init__.py | 0 | ||||
| -rw-r--r-- | pysite/migrations/tables/code_jam_teams/v1.py | 13 | ||||
| -rw-r--r-- | pysite/migrations/tables/code_jam_teams/v2.py | 13 | 
3 files changed, 0 insertions, 26 deletions
diff --git a/pysite/migrations/tables/code_jam_teams/__init__.py b/pysite/migrations/tables/code_jam_teams/__init__.py deleted file mode 100644 index e69de29b..00000000 --- a/pysite/migrations/tables/code_jam_teams/__init__.py +++ /dev/null diff --git a/pysite/migrations/tables/code_jam_teams/v1.py b/pysite/migrations/tables/code_jam_teams/v1.py deleted file mode 100644 index 165d3100..00000000 --- a/pysite/migrations/tables/code_jam_teams/v1.py +++ /dev/null @@ -1,13 +0,0 @@ -def run(db, table, table_obj): -    """ -    Associate the ID of each team's code jam (team -> jam) -    """ - -    for document in db.get_all(table): -        if "jam" not in document: -            # find the code jam containing this team -            for jam in db.get_all("code_jams"): -                if document["id"] in jam["teams"]: -                    document["jam"] = jam["number"] -                    db.insert(table, document, conflict="update", durability="soft") -    db.sync(table) diff --git a/pysite/migrations/tables/code_jam_teams/v2.py b/pysite/migrations/tables/code_jam_teams/v2.py deleted file mode 100644 index c6d7c972..00000000 --- a/pysite/migrations/tables/code_jam_teams/v2.py +++ /dev/null @@ -1,13 +0,0 @@ -def run(db, table, table_obj): -    """ -    Associate the ID of each team's code jam (team -> jam) - again -    """ - -    for document in db.get_all(table): -        if "jam" not in document: -            # find the code jam containing this team -            for jam in db.get_all("code_jams"): -                if document["id"] in jam["teams"]: -                    document["jam"] = jam["number"] -                    db.insert(table, document, conflict="update", durability="soft") -    db.sync(table)  |