mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-25 08:58:23 +03:00
Store titles for casual vote submissions
When an uploader changes the title, it will reset the casual votes
This commit is contained in:
@@ -95,6 +95,15 @@ CREATE TABLE IF NOT EXISTS "casualVotes" (
|
||||
"timeSubmitted" INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "casualVoteTitles" (
|
||||
"videoID" TEXT NOT NULL,
|
||||
"service" TEXT NOT NULL,
|
||||
"id" INTEGER NOT NULL,
|
||||
"hashedVideoID" TEXT NOT NULL,
|
||||
"title" TEXT NOT NULL,
|
||||
PRIMARY KEY("videoID", "service", "id")
|
||||
);
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS pgcrypto; --!sqlite-ignore
|
||||
CREATE EXTENSION IF NOT EXISTS pg_trgm; --!sqlite-ignore
|
||||
|
||||
|
||||
7
databases/_upgrade_private_13.sql
Normal file
7
databases/_upgrade_private_13.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
ALTER TABLE "casualVotes" ADD "titleID" INTEGER default 0;
|
||||
|
||||
UPDATE "config" SET value = 13 WHERE key = 'version';
|
||||
|
||||
COMMIT;
|
||||
7
databases/_upgrade_sponsorTimes_43.sql
Normal file
7
databases/_upgrade_sponsorTimes_43.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
ALTER TABLE "casualVotes" ADD "titleID" INTEGER default 0;
|
||||
|
||||
UPDATE "config" SET value = 43 WHERE key = 'version';
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user