mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2026-01-01 06:09:24 +03:00
Changed from version table to a key-value config table.
This commit is contained in:
@@ -25,8 +25,9 @@ CREATE TABLE IF NOT EXISTS "categoryVotes" (
|
||||
"votes" INTEGER NOT NULL default '0'
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS "version" (
|
||||
"code" INTEGER NOT NULL default '0'
|
||||
CREATE TABLE IF NOT EXISTS "config" (
|
||||
"key" TEXT NOT NULL,
|
||||
"value" TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS sponsorTimes_videoID on sponsorTimes(videoID);
|
||||
|
||||
@@ -19,7 +19,7 @@ INSERT INTO sqlb_temp_table_1 SELECT videoID,startTime,endTime,votes,"1",UUID,us
|
||||
DROP TABLE sponsorTimes;
|
||||
ALTER TABLE sqlb_temp_table_1 RENAME TO "sponsorTimes";
|
||||
|
||||
/* Increase version number */
|
||||
INSERT INTO version VALUES(1);
|
||||
/* Add version to config */
|
||||
INSERT INTO config (key, value) VALUES("version", 1);
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user