diff options
| author | 2018-08-07 15:09:08 +0100 | |
|---|---|---|
| committer | 2018-08-07 15:09:16 +0100 | |
| commit | af54db6c136138c66cf5ca72419989525a0baa5c (patch) | |
| tree | 8519aeab8d45277c51797c7dc23aacf3b56ed1bb /pysite/migrations/tables/code_jam_teams | |
| parent | A wizard is never late, nor is he early. (diff) | |
Initial project layout for django
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) |