mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-28 16:08:27 +00:00
Don't recreate indexes if they already exist
This commit is contained in:
parent
cd59f54af7
commit
8e55c74334
4 changed files with 4 additions and 4 deletions
|
@ -28,7 +28,7 @@ CREATE TABLE IF NOT EXISTS keyserver_cross_signing_keys (
|
|||
stream_id BIGINT NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX keyserver_cross_signing_keys_idx ON keyserver_cross_signing_keys(user_id, key_type, stream_id);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS keyserver_cross_signing_keys_idx ON keyserver_cross_signing_keys(user_id, key_type, stream_id);
|
||||
`
|
||||
|
||||
type crossSigningKeysStatements struct {
|
||||
|
|
|
@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS keyserver_cross_signing_sigs (
|
|||
signature TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX keyserver_cross_signing_sigs_idx ON keyserver_cross_signing_sigs(user_id, target_user_id, target_device_id);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS keyserver_cross_signing_sigs_idx ON keyserver_cross_signing_sigs(user_id, target_user_id, target_device_id);
|
||||
`
|
||||
|
||||
type crossSigningSigsStatements struct {
|
||||
|
|
|
@ -28,7 +28,7 @@ CREATE TABLE IF NOT EXISTS keyserver_cross_signing_keys (
|
|||
stream_id BIGINT NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX keyserver_cross_signing_keys_idx ON keyserver_cross_signing_keys(user_id, key_type, stream_id);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS keyserver_cross_signing_keys_idx ON keyserver_cross_signing_keys(user_id, key_type, stream_id);
|
||||
`
|
||||
|
||||
type crossSigningKeysStatements struct {
|
||||
|
|
|
@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS keyserver_cross_signing_sigs (
|
|||
signature TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX keyserver_cross_signing_sigs_idx ON keyserver_cross_signing_sigs(user_id, target_user_id, target_device_id);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS keyserver_cross_signing_sigs_idx ON keyserver_cross_signing_sigs(user_id, target_user_id, target_device_id);
|
||||
`
|
||||
|
||||
type crossSigningSigsStatements struct {
|
||||
|
|
Loading…
Reference in a new issue