mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 01:13:10 -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 = `
|
const accountDataSchema = `
|
||||||
-- Stores the users account data
|
-- 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
|
-- The highest numeric ID from the output_room_events at the time of saving the data
|
||||||
id BIGINT,
|
id BIGINT,
|
||||||
-- ID of the user the data belongs to
|
-- ID of the user the data belongs to
|
||||||
|
|
@ -40,12 +40,12 @@ CREATE TABLE IF NOT EXISTS account_data (
|
||||||
`
|
`
|
||||||
|
|
||||||
const insertAccountDataSQL = "" +
|
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" +
|
" ON CONFLICT ON CONSTRAINT account_data_unique" +
|
||||||
" DO UPDATE SET id = EXCLUDED.id"
|
" DO UPDATE SET id = EXCLUDED.id"
|
||||||
|
|
||||||
const selectAccountDataInRangeSQL = "" +
|
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" +
|
" WHERE user_id = $1 AND id > $2 AND id <= $3" +
|
||||||
" ORDER BY id ASC"
|
" ORDER BY id ASC"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue