From af54db6c136138c66cf5ca72419989525a0baa5c Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Tue, 7 Aug 2018 15:09:08 +0100 Subject: Initial project layout for django --- pysite/migrations/tables/code_jam_teams/__init__.py | 0 pysite/migrations/tables/code_jam_teams/v1.py | 13 ------------- pysite/migrations/tables/code_jam_teams/v2.py | 13 ------------- 3 files changed, 26 deletions(-) delete mode 100644 pysite/migrations/tables/code_jam_teams/__init__.py delete mode 100644 pysite/migrations/tables/code_jam_teams/v1.py delete mode 100644 pysite/migrations/tables/code_jam_teams/v2.py (limited to 'pysite/migrations/tables/code_jam_teams') 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 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) -- cgit v1.2.3