2021-02-19 01:48:36 +01:00
|
|
|
BEGIN TRANSACTION;
|
|
|
|
|
|
|
|
/* Add new voting field */
|
|
|
|
CREATE TABLE "sqlb_temp_table_6" (
|
|
|
|
"videoID" TEXT NOT NULL,
|
|
|
|
"startTime" REAL NOT NULL,
|
|
|
|
"endTime" REAL NOT NULL,
|
|
|
|
"votes" INTEGER NOT NULL,
|
2021-06-25 05:44:08 +02:00
|
|
|
"locked" INTEGER NOT NULL default '0',
|
|
|
|
"incorrectVotes" INTEGER NOT NULL default '1',
|
2021-02-19 01:48:36 +01:00
|
|
|
"UUID" TEXT NOT NULL UNIQUE,
|
|
|
|
"userID" TEXT NOT NULL,
|
|
|
|
"timeSubmitted" INTEGER NOT NULL,
|
|
|
|
"views" INTEGER NOT NULL,
|
2021-03-05 01:44:54 +01:00
|
|
|
"category" TEXT NOT NULL DEFAULT 'sponsor',
|
2021-02-19 01:48:36 +01:00
|
|
|
"shadowHidden" INTEGER NOT NULL,
|
2021-06-25 05:44:08 +02:00
|
|
|
"hashedVideoID" TEXT NOT NULL default ''
|
2021-02-19 01:48:36 +01:00
|
|
|
);
|
|
|
|
|
2021-03-05 02:23:05 +01:00
|
|
|
INSERT INTO sqlb_temp_table_6 SELECT "videoID","startTime","endTime","votes",'0',"incorrectVotes","UUID","userID","timeSubmitted","views","category","shadowHidden","hashedVideoID" FROM "sponsorTimes";
|
2021-02-19 01:48:36 +01:00
|
|
|
|
2021-03-05 02:23:05 +01:00
|
|
|
DROP TABLE "sponsorTimes";
|
2021-02-19 01:48:36 +01:00
|
|
|
ALTER TABLE sqlb_temp_table_6 RENAME TO "sponsorTimes";
|
|
|
|
|
2021-03-05 02:23:05 +01:00
|
|
|
UPDATE "config" SET value = 6 WHERE key = 'version';
|
2021-02-19 01:48:36 +01:00
|
|
|
|
|
|
|
COMMIT;
|