s/definition/filter_json/ since definition is now used to mean a component of the filter, rather than the complete json

pull/37/head
Kegan Dougal 2015-01-28 17:42:19 +00:00
parent c23e3db544
commit 11634017f4
2 changed files with 3 additions and 3 deletions

View File

@ -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))

View File

@ -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)
);