From c4c107ad6d3093d9d33ffb4f41a10e59efaddb45 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Thu, 31 May 2018 13:50:49 +0100 Subject: Update privacy policy and related migrations * Don't collect DOB anymore, and remove it from database * Make doubly-sure all emails are gone because I'm paranoid and "update" doesn't do what it sounds like --- pysite/migrations/tables/users/v2.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 pysite/migrations/tables/users/v2.py (limited to 'pysite/migrations/tables/users') diff --git a/pysite/migrations/tables/users/v2.py b/pysite/migrations/tables/users/v2.py new file mode 100644 index 00000000..820d0d6d --- /dev/null +++ b/pysite/migrations/tables/users/v2.py @@ -0,0 +1,11 @@ +def run(db, table, table_obj): + """ + Remove stored email addresses from every user document - "apparently `update` doesn't update" update + """ + + for document in db.get_all(table): + if "email" in document: + del document["email"] + + db.insert(table, document, conflict="replace", durability="soft") + db.sync(table) -- cgit v1.2.3