From 073a2988e6835572cd715b1fc620140bed603491 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 13 Dec 2022 13:57:41 +0100 Subject: [PATCH] Move creation of room_id index into its own migration --- crates/collab/migrations.sqlite/20221109000000_test_schema.sql | 1 + .../20221207165001_add_connection_lost_to_room_participants.sql | 1 - .../20221213125710_index_room_participants_on_room_id.sql | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 crates/collab/migrations/20221213125710_index_room_participants_on_room_id.sql diff --git a/crates/collab/migrations.sqlite/20221109000000_test_schema.sql b/crates/collab/migrations.sqlite/20221109000000_test_schema.sql index 0d4bcac5dd..c0cc5b3457 100644 --- a/crates/collab/migrations.sqlite/20221109000000_test_schema.sql +++ b/crates/collab/migrations.sqlite/20221109000000_test_schema.sql @@ -129,6 +129,7 @@ CREATE TABLE "room_participants" ( "calling_connection_epoch" TEXT NOT NULL ); CREATE UNIQUE INDEX "index_room_participants_on_user_id" ON "room_participants" ("user_id"); +CREATE INDEX "index_room_participants_on_room_id" ON "room_participants" ("room_id"); CREATE INDEX "index_room_participants_on_answering_connection_epoch" ON "room_participants" ("answering_connection_epoch"); CREATE INDEX "index_room_participants_on_calling_connection_epoch" ON "room_participants" ("calling_connection_epoch"); CREATE INDEX "index_room_participants_on_answering_connection_id" ON "room_participants" ("answering_connection_id"); diff --git a/crates/collab/migrations/20221207165001_add_connection_lost_to_room_participants.sql b/crates/collab/migrations/20221207165001_add_connection_lost_to_room_participants.sql index 2a069ad2a7..ed0cf972bc 100644 --- a/crates/collab/migrations/20221207165001_add_connection_lost_to_room_participants.sql +++ b/crates/collab/migrations/20221207165001_add_connection_lost_to_room_participants.sql @@ -3,6 +3,5 @@ ALTER TABLE "room_participants" CREATE INDEX "index_project_collaborators_on_connection_id" ON "project_collaborators" ("connection_id"); CREATE UNIQUE INDEX "index_project_collaborators_on_project_id_connection_id_and_epoch" ON "project_collaborators" ("project_id", "connection_id", "connection_epoch"); -CREATE INDEX "index_room_participants_on_room_id" ON "room_participants" ("room_id"); CREATE INDEX "index_room_participants_on_answering_connection_id" ON "room_participants" ("answering_connection_id"); CREATE UNIQUE INDEX "index_room_participants_on_answering_connection_id_and_answering_connection_epoch" ON "room_participants" ("answering_connection_id", "answering_connection_epoch"); diff --git a/crates/collab/migrations/20221213125710_index_room_participants_on_room_id.sql b/crates/collab/migrations/20221213125710_index_room_participants_on_room_id.sql new file mode 100644 index 0000000000..f40ca81906 --- /dev/null +++ b/crates/collab/migrations/20221213125710_index_room_participants_on_room_id.sql @@ -0,0 +1 @@ +CREATE INDEX "index_room_participants_on_room_id" ON "room_participants" ("room_id");