aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/migrations/tables/users/v1.py
blob: 9ba70142540ed1e7fa4394b2211b1a02a843f230 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
def run(db, table, table_obj):
    """
    Remove stored email addresses from every user document
    """

    for document in db.get_all(table):
        if "email" in document:
            del document["email"]

            db.insert(table, document, conflict="update", durability="soft")
    db.sync(table)