mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-30 06:02:12 +00:00
Be more postgressive
This commit is contained in:
parent
fb95035a65
commit
61cd5d9045
@ -181,7 +181,7 @@ class RegistrationStore(SQLBaseStore):
|
|||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def user_add_threepid(self, user_id, medium, address, validated_at, added_at):
|
def user_add_threepid(self, user_id, medium, address, validated_at, added_at):
|
||||||
yield self._simple_upsert("user_threepids", {
|
yield self._simple_upsert("user_threepids", {
|
||||||
"user": user_id,
|
"user_id": user_id,
|
||||||
"medium": medium,
|
"medium": medium,
|
||||||
"address": address,
|
"address": address,
|
||||||
}, {
|
}, {
|
||||||
@ -193,7 +193,7 @@ class RegistrationStore(SQLBaseStore):
|
|||||||
def user_get_threepids(self, user_id):
|
def user_get_threepids(self, user_id):
|
||||||
ret = yield self._simple_select_list(
|
ret = yield self._simple_select_list(
|
||||||
"user_threepids", {
|
"user_threepids", {
|
||||||
"user": user_id
|
"user_id": user_id
|
||||||
},
|
},
|
||||||
['medium', 'address', 'validated_at', 'added_at'],
|
['medium', 'address', 'validated_at', 'added_at'],
|
||||||
'user_get_threepids'
|
'user_get_threepids'
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
CREATE TABLE user_threepids (
|
CREATE TABLE user_threepids (
|
||||||
user TEXT NOT NULL,
|
user_id TEXT NOT NULL,
|
||||||
medium TEXT NOT NULL,
|
medium TEXT NOT NULL,
|
||||||
address TEXT NOT NULL,
|
address TEXT NOT NULL,
|
||||||
validated_at BIGINT NOT NULL,
|
validated_at BIGINT NOT NULL,
|
||||||
added_at BIGINT NOT NULL,
|
added_at BIGINT NOT NULL,
|
||||||
CONSTRAINT user_medium_address UNIQUE (user, medium, address)
|
CONSTRAINT user_medium_address UNIQUE (user, medium, address)
|
||||||
);
|
);
|
||||||
CREATE INDEX user_threepids_user ON user_threepids(user);
|
CREATE INDEX user_threepids_user_id ON user_threepids(user_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user