2020-04-28 05:01:51 +02:00
|
|
|
BEGIN TRANSACTION;
|
|
|
|
|
|
|
|
/* Add incorrectVotes field */
|
|
|
|
CREATE TABLE "sqlb_temp_table_1" (
|
|
|
|
"videoID" TEXT NOT NULL,
|
|
|
|
"startTime" REAL NOT NULL,
|
|
|
|
"endTime" REAL NOT NULL,
|
|
|
|
"votes" INTEGER NOT NULL,
|
2021-06-25 05:44:08 +02:00
|
|
|
"incorrectVotes" INTEGER NOT NULL default 1,
|
2020-04-28 05:01:51 +02: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',
|
2020-04-28 05:01:51 +02:00
|
|
|
"shadowHidden" INTEGER NOT NULL
|
|
|
|
);
|
2021-03-05 02:23:05 +01:00
|
|
|
INSERT INTO sqlb_temp_table_1 SELECT "videoID","startTime","endTime","votes",'1',"UUID","userID","timeSubmitted","views","category","shadowHidden" FROM "sponsorTimes";
|
2020-04-28 05:01:51 +02:00
|
|
|
|
2021-03-05 02:23:05 +01:00
|
|
|
DROP TABLE "sponsorTimes";
|
2020-04-28 05:01:51 +02:00
|
|
|
ALTER TABLE sqlb_temp_table_1 RENAME TO "sponsorTimes";
|
|
|
|
|
2020-05-03 18:01:49 +02:00
|
|
|
/* Add version to config */
|
2021-03-05 01:44:54 +01:00
|
|
|
INSERT INTO config (key, value) VALUES('version', 1);
|
2020-04-28 05:01:51 +02:00
|
|
|
|
|
|
|
COMMIT;
|