diff options
author | Kegan Dougal <kegan@matrix.org> | 2015-01-28 17:42:19 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2015-01-28 17:42:19 +0000 |
commit | 11634017f47779d784325da5513517ad76b0dbc1 (patch) | |
tree | 9dd0f9238ca1b126dbc3d10c5fb3b46607ccab7b /synapse/storage | |
parent | Add filter JSON sanity checks. (diff) | |
download | synapse-11634017f47779d784325da5513517ad76b0dbc1.tar.xz |
s/definition/filter_json/ since definition is now used to mean a component of the filter, rather than the complete json
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/filtering.py | 4 | ||||
-rw-r--r-- | synapse/storage/schema/filtering.sql | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/filtering.py b/synapse/storage/filtering.py index bab68a9eef..cb01c2040f 100644 --- a/synapse/storage/filtering.py +++ b/synapse/storage/filtering.py @@ -33,7 +33,7 @@ class FilteringStore(SQLBaseStore): "user_id": user_localpart, "filter_id": filter_id, }, - retcol="definition", + retcol="filter_json", allow_none=False, ) @@ -57,7 +57,7 @@ class FilteringStore(SQLBaseStore): filter_id = max_id + 1 sql = ( - "INSERT INTO user_filters (user_id, filter_id, definition)" + "INSERT INTO user_filters (user_id, filter_id, filter_json)" "VALUES(?, ?, ?)" ) txn.execute(sql, (user_localpart, filter_id, def_json)) diff --git a/synapse/storage/schema/filtering.sql b/synapse/storage/schema/filtering.sql index 795aca4afd..beb39ca201 100644 --- a/synapse/storage/schema/filtering.sql +++ b/synapse/storage/schema/filtering.sql @@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS user_filters( user_id TEXT, filter_id INTEGER, - definition TEXT, + filter_json TEXT, FOREIGN KEY(user_id) REFERENCES users(id) ); |