mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Fix index for hashed video id dearrow fetching
This commit is contained in:
parent
0edf0b9e1c
commit
7aaf000d99
2 changed files with 12 additions and 4 deletions
|
@ -134,9 +134,9 @@ CREATE INDEX IF NOT EXISTS "titles_videoID"
|
||||||
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST)
|
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST)
|
||||||
TABLESPACE pg_default;
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS "titles_hashedVideoID"
|
CREATE INDEX IF NOT EXISTS "titles_hashedVideoID_2"
|
||||||
ON public."titles" USING btree
|
ON public."titles" USING btree
|
||||||
("hashedVideoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST)
|
(service COLLATE pg_catalog."default" ASC NULLS LAST, "hashedVideoID" text_pattern_ops ASC NULLS LAST, "timeSubmitted" ASC NULLS LAST)
|
||||||
TABLESPACE pg_default;
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
-- titleVotes
|
-- titleVotes
|
||||||
|
@ -163,9 +163,9 @@ CREATE INDEX IF NOT EXISTS "thumbnails_videoID"
|
||||||
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST)
|
("videoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST)
|
||||||
TABLESPACE pg_default;
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS "thumbnails_hashedVideoID"
|
CREATE INDEX IF NOT EXISTS "thumbnails_hashedVideoID_2"
|
||||||
ON public."thumbnails" USING btree
|
ON public."thumbnails" USING btree
|
||||||
("hashedVideoID" COLLATE pg_catalog."default" ASC NULLS LAST, "service" COLLATE pg_catalog."default" ASC NULLS LAST)
|
(service COLLATE pg_catalog."default" ASC NULLS LAST, "hashedVideoID" text_pattern_ops ASC NULLS LAST, "timeSubmitted" ASC NULLS LAST)
|
||||||
TABLESPACE pg_default;
|
TABLESPACE pg_default;
|
||||||
|
|
||||||
-- thumbnailVotes
|
-- thumbnailVotes
|
||||||
|
|
8
databases/_upgrade_sponsorTimes_40.sql
Normal file
8
databases/_upgrade_sponsorTimes_40.sql
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
BEGIN TRANSACTION;
|
||||||
|
|
||||||
|
DROP INDEX IF EXISTS "titles_hashedVideoID";
|
||||||
|
DROP INDEX IF EXISTS "thumbnails_hashedVideoID";
|
||||||
|
|
||||||
|
UPDATE "config" SET value = 40 WHERE key = 'version';
|
||||||
|
|
||||||
|
COMMIT;
|
Loading…
Reference in a new issue