mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-10 16:33:11 -06:00
Use a different name for the sync AD table
This commit is contained in:
parent
57b97aef0c
commit
d251e275f0
|
|
@ -22,7 +22,7 @@ import (
|
|||
|
||||
const accountDataSchema = `
|
||||
-- Stores the users account data
|
||||
CREATE TABLE IF NOT EXISTS account_data (
|
||||
CREATE TABLE IF NOT EXISTS account_data_type (
|
||||
-- The highest numeric ID from the output_room_events at the time of saving the data
|
||||
id BIGINT,
|
||||
-- ID of the user the data belongs to
|
||||
|
|
@ -40,12 +40,12 @@ CREATE TABLE IF NOT EXISTS account_data (
|
|||
`
|
||||
|
||||
const insertAccountDataSQL = "" +
|
||||
"INSERT INTO account_data (id, user_id, room_id, type) VALUES ($1, $2, $3, $4)" +
|
||||
"INSERT INTO account_data_type (id, user_id, room_id, type) VALUES ($1, $2, $3, $4)" +
|
||||
" ON CONFLICT ON CONSTRAINT account_data_unique" +
|
||||
" DO UPDATE SET id = EXCLUDED.id"
|
||||
|
||||
const selectAccountDataInRangeSQL = "" +
|
||||
"SELECT room_id, type FROM account_data" +
|
||||
"SELECT room_id, type FROM account_data_type" +
|
||||
" WHERE user_id = $1 AND id > $2 AND id <= $3" +
|
||||
" ORDER BY id ASC"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue