aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/migrations/tables/code_jams
diff options
context:
space:
mode:
Diffstat (limited to 'pysite/migrations/tables/code_jams')
-rw-r--r--pysite/migrations/tables/code_jams/__init__.py0
-rw-r--r--pysite/migrations/tables/code_jams/v1.py11
-rw-r--r--pysite/migrations/tables/code_jams/v2.py10
3 files changed, 0 insertions, 21 deletions
diff --git a/pysite/migrations/tables/code_jams/__init__.py b/pysite/migrations/tables/code_jams/__init__.py
deleted file mode 100644
index e69de29b..00000000
--- a/pysite/migrations/tables/code_jams/__init__.py
+++ /dev/null
diff --git a/pysite/migrations/tables/code_jams/v1.py b/pysite/migrations/tables/code_jams/v1.py
deleted file mode 100644
index cce3b112..00000000
--- a/pysite/migrations/tables/code_jams/v1.py
+++ /dev/null
@@ -1,11 +0,0 @@
-def run(db, table, table_obj):
- """
- Add "teams" list to jams without it
- """
-
- for document in db.get_all(table):
- if "teams" not in document:
- document["teams"] = []
-
- db.insert(table, document, conflict="replace", durability="soft")
- db.sync(table)
diff --git a/pysite/migrations/tables/code_jams/v2.py b/pysite/migrations/tables/code_jams/v2.py
deleted file mode 100644
index df4752c8..00000000
--- a/pysite/migrations/tables/code_jams/v2.py
+++ /dev/null
@@ -1,10 +0,0 @@
-def run(db, table, table_obj):
- """
- Clean list of teams from teams that do not exist anymore.
- """
- for document in db.get_all(table):
- for team_id in document["teams"]:
- if db.get("code_jam_teams", team_id) is None:
- document["teams"].remove(team_id)
- db.insert(table, document, conflict="update", durability="soft")
- db.sync(table)