SponsorBlockServer/databases/_upgrade_sponsorTimes_24.sql

22 lines
580 B
MySQL
Raw Permalink Normal View History

2021-09-30 08:56:55 +02:00
BEGIN TRANSACTION;
ALTER TABLE "lockCategories" ADD "service" TEXT NOT NULL default 'YouTube';
UPDATE "lockCategories"
SET "service" = "sponsorTimes"."service"
FROM "sponsorTimes"
WHERE "lockCategories"."videoID" = "sponsorTimes"."videoID";
ALTER TABLE "unlistedVideos" ADD "service" TEXT NOT NULL default 'YouTube';
UPDATE "unlistedVideos"
SET "service" = "sponsorTimes"."service"
FROM "sponsorTimes"
WHERE "unlistedVideos"."videoID" = "sponsorTimes"."videoID";
DROP INDEX IF EXISTS "noSegments_videoID";
UPDATE "config" SET value = 24 WHERE key = 'version';
COMMIT;