mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
Better private db index
This commit is contained in:
@@ -1,13 +1,8 @@
|
|||||||
-- sponsorTimes
|
-- sponsorTimes
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS "sponsorTimes_hashedIP"
|
CREATE INDEX IF NOT EXISTS "privateDB_sponsorTimes_v3"
|
||||||
ON public."sponsorTimes" USING btree
|
ON public."sponsorTimes" USING btree
|
||||||
("hashedIP" COLLATE pg_catalog."default" ASC NULLS LAST)
|
("hashedIP" COLLATE pg_catalog."default" ASC NULLS LAST, "videoID" ASC NULLS LAST, service COLLATE pg_catalog."default" ASC NULLS LAST)
|
||||||
TABLESPACE pg_default;
|
|
||||||
|
|
||||||
CREATE INDEX IF NOT EXISTS "privateDB_sponsorTimes_videoID_v2"
|
|
||||||
ON public."sponsorTimes" USING btree
|
|
||||||
("videoID" ASC NULLS LAST, service COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
||||||
;
|
;
|
||||||
|
|
||||||
-- votes
|
-- votes
|
||||||
|
|||||||
7
databases/_upgrade_private_6.sql
Normal file
7
databases/_upgrade_private_6.sql
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
BEGIN TRANSACTION;
|
||||||
|
|
||||||
|
DROP INDEX IF EXISTS "sponsorTimes_hashedIP", "privateDB_sponsorTimes_videoID_v2";
|
||||||
|
|
||||||
|
UPDATE "config" SET value = 6 WHERE key = 'version';
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
Reference in New Issue
Block a user