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

This commit is contained in:
Kegan Dougal 2015-01-28 17:42:19 +00:00
parent c23e3db544
commit 11634017f4
2 changed files with 3 additions and 3 deletions
synapse/storage

View File

@ -33,7 +33,7 @@ class FilteringStore(SQLBaseStore):
"user_id": user_localpart, "user_id": user_localpart,
"filter_id": filter_id, "filter_id": filter_id,
}, },
retcol="definition", retcol="filter_json",
allow_none=False, allow_none=False,
) )
@ -57,7 +57,7 @@ class FilteringStore(SQLBaseStore):
filter_id = max_id + 1 filter_id = max_id + 1
sql = ( sql = (
"INSERT INTO user_filters (user_id, filter_id, definition)" "INSERT INTO user_filters (user_id, filter_id, filter_json)"
"VALUES(?, ?, ?)" "VALUES(?, ?, ?)"
) )
txn.execute(sql, (user_localpart, filter_id, def_json)) txn.execute(sql, (user_localpart, filter_id, def_json))

View File

@ -15,7 +15,7 @@
CREATE TABLE IF NOT EXISTS user_filters( CREATE TABLE IF NOT EXISTS user_filters(
user_id TEXT, user_id TEXT,
filter_id INTEGER, filter_id INTEGER,
definition TEXT, filter_json TEXT,
FOREIGN KEY(user_id) REFERENCES users(id) FOREIGN KEY(user_id) REFERENCES users(id)
); );