mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Better private db index
This commit is contained in:
parent
6b1fa7f5d0
commit
90fc02e340
2 changed files with 9 additions and 7 deletions
|
@ -1,13 +1,8 @@
|
|||
-- sponsorTimes
|
||||
|
||||
CREATE INDEX IF NOT EXISTS "sponsorTimes_hashedIP"
|
||||
CREATE INDEX IF NOT EXISTS "privateDB_sponsorTimes_v3"
|
||||
ON public."sponsorTimes" USING btree
|
||||
("hashedIP" 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)
|
||||
("hashedIP" COLLATE pg_catalog."default" ASC NULLS LAST, "videoID" ASC NULLS LAST, service COLLATE pg_catalog."default" ASC NULLS LAST)
|
||||
;
|
||||
|
||||
-- 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;
|
Loading…
Reference in a new issue