diff options
author | 2018-06-07 16:34:59 +0100 | |
---|---|---|
committer | 2018-06-07 16:34:59 +0100 | |
commit | c5d8157670ea2b7f448fc41ca790b25c03a4bedb (patch) | |
tree | 428bb0f210b9094d6d147cd2c20144de5c1e8b2e /pysite/migrations/tables | |
parent | [CI] Add deployment env and cache .gem (diff) |
Replace GitHub with GitLab across the project
Diffstat (limited to 'pysite/migrations/tables')
-rw-r--r-- | pysite/migrations/tables/code_jam_participants/v2.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pysite/migrations/tables/code_jam_participants/v2.py b/pysite/migrations/tables/code_jam_participants/v2.py new file mode 100644 index 00000000..858da279 --- /dev/null +++ b/pysite/migrations/tables/code_jam_participants/v2.py @@ -0,0 +1,12 @@ +def run(db, table, table_obj): + """ + GitHub usernames -> Store as GitLab username, this will be correct for most jammers + """ + + for document in db.get_all(table): + if "github_username" in document: + document["gitlab_username"] = document["github_username"] + del document["github_username"] + + db.insert(table, document, conflict="replace", durability="soft") + db.sync(table) |