2021-03-22 00:16:56 +01:00
|
|
|
-- sponsorTimes
|
|
|
|
|
2021-03-27 00:02:32 +01:00
|
|
|
CREATE INDEX IF NOT EXISTS "sponsorTime_timeSubmitted"
|
2021-03-22 00:16:56 +01:00
|
|
|
ON public."sponsorTimes" USING btree
|
|
|
|
("timeSubmitted" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "sponsorTime_userID"
|
|
|
|
ON public."sponsorTimes" USING btree
|
|
|
|
("userID" COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "sponsorTimes_UUID"
|
|
|
|
ON public."sponsorTimes" USING btree
|
|
|
|
("UUID" COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
2021-03-27 00:02:32 +01:00
|
|
|
|
2022-05-14 21:43:38 +02:00
|
|
|
CREATE INDEX IF NOT EXISTS "sponsorTimes_hashedVideoID"
|
|
|
|
ON public."sponsorTimes" USING btree
|
|
|
|
(service COLLATE pg_catalog."default" ASC NULLS LAST, "hashedVideoID" text_pattern_ops ASC NULLS LAST, "startTime" ASC NULLS LAST)
|
2021-03-22 00:16:56 +01:00
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "sponsorTimes_videoID"
|
|
|
|
ON public."sponsorTimes" USING btree
|
2022-05-14 21:43:38 +02:00
|
|
|
(service COLLATE pg_catalog."default" ASC NULLS LAST, "videoID" COLLATE pg_catalog."default" ASC NULLS LAST, "startTime" ASC NULLS LAST)
|
2021-03-22 00:16:56 +01:00
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
2022-06-24 07:24:55 +02:00
|
|
|
CREATE INDEX IF NOT EXISTS "sponsorTimes_videoID_category"
|
|
|
|
ON public."sponsorTimes" USING btree
|
2022-06-24 08:21:37 +02:00
|
|
|
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, "category" COLLATE pg_catalog."default" ASC NULLS LAST)
|
2022-06-24 07:24:55 +02:00
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
2021-11-07 03:43:03 +01:00
|
|
|
CREATE INDEX IF NOT EXISTS "sponsorTimes_description_gin"
|
|
|
|
ON public."sponsorTimes" USING gin
|
|
|
|
("description" COLLATE pg_catalog."default" gin_trgm_ops, category COLLATE pg_catalog."default" gin_trgm_ops)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
2021-03-22 00:16:56 +01:00
|
|
|
-- userNames
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "userNames_userID"
|
|
|
|
ON public."userNames" USING btree
|
|
|
|
("userID" COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
-- vipUsers
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "vipUsers_index"
|
|
|
|
ON public."vipUsers" USING btree
|
|
|
|
("userID" COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
-- warnings
|
|
|
|
|
2021-03-27 00:02:32 +01:00
|
|
|
CREATE INDEX IF NOT EXISTS "warnings_index"
|
2021-03-22 00:16:56 +01:00
|
|
|
ON public.warnings USING btree
|
|
|
|
("userID" COLLATE pg_catalog."default" ASC NULLS LAST, "issueTime" DESC NULLS LAST, enabled DESC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "warnings_issueTime"
|
|
|
|
ON public.warnings USING btree
|
|
|
|
("issueTime" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
2021-05-06 21:53:31 +02:00
|
|
|
-- lockCategories
|
2021-03-22 00:16:56 +01:00
|
|
|
|
2021-09-30 08:56:55 +02:00
|
|
|
CREATE INDEX IF NOT EXISTS "lockCategories_videoID"
|
2021-05-06 21:53:31 +02:00
|
|
|
ON public."lockCategories" USING btree
|
2021-09-30 08:56:55 +02:00
|
|
|
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, service COLLATE pg_catalog."default" ASC NULLS LAST, category COLLATE pg_catalog."default" ASC NULLS LAST)
|
2021-03-22 00:16:56 +01:00
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
-- categoryVotes
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "categoryVotes_UUID_public"
|
|
|
|
ON public."categoryVotes" USING btree
|
|
|
|
("UUID" COLLATE pg_catalog."default" ASC NULLS LAST, category COLLATE pg_catalog."default" ASC NULLS LAST)
|
2021-06-20 19:41:35 +02:00
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
-- shadowBannedUsers
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "shadowBannedUsers_index"
|
|
|
|
ON public."shadowBannedUsers" USING btree
|
|
|
|
("userID" COLLATE pg_catalog."default" ASC NULLS LAST)
|
2021-10-17 20:55:55 +02:00
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
-- videoInfo
|
|
|
|
CREATE INDEX IF NOT EXISTS "videoInfo_videoID"
|
|
|
|
ON public."videoInfo" USING btree
|
|
|
|
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "videoInfo_channelID"
|
|
|
|
ON public."videoInfo" USING btree
|
|
|
|
("channelID" COLLATE pg_catalog."default" ASC NULLS LAST)
|
2021-11-15 05:09:12 +01:00
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
-- ratings
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "ratings_hashedVideoID_gin"
|
|
|
|
ON public."ratings" USING gin
|
2021-11-17 04:53:59 +01:00
|
|
|
("hashedVideoID" COLLATE pg_catalog."default" gin_trgm_ops)
|
2021-11-15 05:09:12 +01:00
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "ratings_hashedVideoID"
|
|
|
|
ON public."ratings" USING btree
|
|
|
|
("hashedVideoID" COLLATE pg_catalog."default" ASC NULLS LAST, service COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "ratings_videoID"
|
|
|
|
ON public."ratings" USING btree
|
|
|
|
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, service COLLATE pg_catalog."default" ASC NULLS LAST)
|
2022-07-06 06:11:45 +02:00
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
--- userFeatures
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "userFeatures_userID"
|
|
|
|
ON public."userFeatures" USING btree
|
|
|
|
("userID" COLLATE pg_catalog."default" ASC NULLS LAST, "feature" ASC NULLS LAST)
|
2022-12-23 22:56:27 +01:00
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
-- titles
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "titles_timeSubmitted"
|
|
|
|
ON public."titles" USING btree
|
|
|
|
("timeSubmitted" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
2023-07-26 21:19:22 +02:00
|
|
|
CREATE INDEX IF NOT EXISTS "titles_votes_timeSubmitted"
|
|
|
|
ON public."titles" USING btree
|
|
|
|
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST, "votes" DESC NULLS LAST, "timeSubmitted" DESC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
2022-12-23 22:56:27 +01:00
|
|
|
CREATE INDEX IF NOT EXISTS "titles_videoID"
|
|
|
|
ON public."titles" USING btree
|
|
|
|
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "titles_hashedVideoID"
|
|
|
|
ON public."titles" USING btree
|
|
|
|
("hashedVideoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
-- thumbnails
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "thumbnails_timeSubmitted"
|
|
|
|
ON public."thumbnails" USING btree
|
|
|
|
("timeSubmitted" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
2023-07-26 21:19:22 +02:00
|
|
|
CREATE INDEX IF NOT EXISTS "thumbnails_votes_timeSubmitted"
|
|
|
|
ON public."thumbnails" USING btree
|
|
|
|
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST, "votes" DESC NULLS LAST, "timeSubmitted" DESC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
2022-12-23 22:56:27 +01:00
|
|
|
CREATE INDEX IF NOT EXISTS "thumbnails_videoID"
|
|
|
|
ON public."thumbnails" USING btree
|
|
|
|
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
|
|
|
CREATE INDEX IF NOT EXISTS "thumbnails_hashedVideoID"
|
|
|
|
ON public."thumbnails" USING btree
|
|
|
|
("hashedVideoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST)
|
2021-03-22 00:16:56 +01:00
|
|
|
TABLESPACE pg_default;
|