mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +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
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
const openIDTokenSchema = `
|
||||
-- Stores data about accounts.
|
||||
CREATE TABLE IF NOT EXISTS open_id_tokens (
|
||||
CREATE TABLE IF NOT EXISTS userapi_openid_tokens (
|
||||
-- The value of the token issued to a user
|
||||
token TEXT NOT NULL PRIMARY KEY,
|
||||
-- The Matrix user ID for this account
|
||||
|
@ -24,10 +24,10 @@ CREATE TABLE IF NOT EXISTS open_id_tokens (
|
|||
`
|
||||
|
||||
const insertOpenIDTokenSQL = "" +
|
||||
"INSERT INTO open_id_tokens(token, localpart, token_expires_at_ms) VALUES ($1, $2, $3)"
|
||||
"INSERT INTO userapi_openid_tokens(token, localpart, token_expires_at_ms) VALUES ($1, $2, $3)"
|
||||
|
||||
const selectOpenIDTokenSQL = "" +
|
||||
"SELECT localpart, token_expires_at_ms FROM open_id_tokens WHERE token = $1"
|
||||
"SELECT localpart, token_expires_at_ms FROM userapi_openid_tokens WHERE token = $1"
|
||||
|
||||
type openIDTokenStatements struct {
|
||||
db *sql.DB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue