2020-05-23 16:54:21 +02:00
|
|
|
BEGIN TRANSACTION;
|
|
|
|
|
2020-09-10 00:14:20 +02:00
|
|
|
/* hash upgrade test sha256('vid') = '1ff838dc6ca9680d88455341118157d59a055fe6d0e3870f9c002847bebe4663'
|
2020-05-23 16:54:21 +02:00
|
|
|
/* Add hash field */
|
2020-09-10 00:14:20 +02:00
|
|
|
ALTER TABLE sponsorTimes ADD hashedVideoID TEXT NOT NULL default "";
|
|
|
|
UPDATE sponsorTimes SET hashedVideoID = sha256(videoID);
|
2020-05-23 16:54:21 +02:00
|
|
|
|
2020-09-04 19:49:28 +02:00
|
|
|
CREATE INDEX IF NOT EXISTS sponsorTimes_hashedVideoID on sponsorTimes(hashedVideoID);
|
|
|
|
|
2020-05-23 16:54:21 +02:00
|
|
|
/* Bump version in config */
|
2020-08-30 23:33:56 +02:00
|
|
|
UPDATE config SET value = 3 WHERE key = "version";
|
2020-05-23 16:54:21 +02:00
|
|
|
|
|
|
|
COMMIT;
|