mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 13:52:46 +00:00
Namespace user API tables (#2806)
This migrates all the various user API tables, indices and sequences to be `userapi_`-namespaced, rather than the mess they are all now.
This commit is contained in:
parent
9c189b1b80
commit
3aa92efaa3
34 changed files with 441 additions and 194 deletions
|
@ -106,7 +106,7 @@ func mustUpdateDeviceLastSeen(
|
|||
timestamp time.Time,
|
||||
) {
|
||||
t.Helper()
|
||||
_, err := db.ExecContext(ctx, "UPDATE device_devices SET last_seen_ts = $1 WHERE localpart = $2", gomatrixserverlib.AsTimestamp(timestamp), localpart)
|
||||
_, err := db.ExecContext(ctx, "UPDATE userapi_devices SET last_seen_ts = $1 WHERE localpart = $2", gomatrixserverlib.AsTimestamp(timestamp), localpart)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to update device last seen")
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ func mustUserUpdateRegistered(
|
|||
localpart string,
|
||||
timestamp time.Time,
|
||||
) {
|
||||
_, err := db.ExecContext(ctx, "UPDATE account_accounts SET created_ts = $1 WHERE localpart = $2", gomatrixserverlib.AsTimestamp(timestamp), localpart)
|
||||
_, err := db.ExecContext(ctx, "UPDATE userapi_accounts SET created_ts = $1 WHERE localpart = $2", gomatrixserverlib.AsTimestamp(timestamp), localpart)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to update device last seen")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue