From 53936cb9f9791979e6470207d056e568fcb4a66c Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Sun, 30 Oct 2022 17:59:17 +0000 Subject: [PATCH] Add index for videoID. --- migrations/2022-10-30-175428_create_video_id_index/down.sql | 1 + migrations/2022-10-30-175428_create_video_id_index/up.sql | 1 + src/schema.rs | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 migrations/2022-10-30-175428_create_video_id_index/down.sql create mode 100644 migrations/2022-10-30-175428_create_video_id_index/up.sql diff --git a/migrations/2022-10-30-175428_create_video_id_index/down.sql b/migrations/2022-10-30-175428_create_video_id_index/down.sql new file mode 100644 index 0000000..62c20f9 --- /dev/null +++ b/migrations/2022-10-30-175428_create_video_id_index/down.sql @@ -0,0 +1 @@ +DROP INDEX IF EXISTS "sponsor_video_id_idx"; diff --git a/migrations/2022-10-30-175428_create_video_id_index/up.sql b/migrations/2022-10-30-175428_create_video_id_index/up.sql new file mode 100644 index 0000000..1cc7870 --- /dev/null +++ b/migrations/2022-10-30-175428_create_video_id_index/up.sql @@ -0,0 +1 @@ +CREATE INDEX sponsor_video_id_idx ON "sponsorTimes"("videoID"); diff --git a/src/schema.rs b/src/schema.rs index 8ebfa03..57ebeba 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -1,7 +1,6 @@ // @generated automatically by Diesel CLI. diesel::table! { - #[allow(non_snake_case)] sponsorTimes (UUID) { videoID -> Text, startTime -> Float4,