SponsorBlockServer/databases/_upgrade_sponsorTimes_3.sql

13 lines
448 B
MySQL
Raw Normal View History

BEGIN TRANSACTION;
2020-09-10 00:14:20 +02:00
/* hash upgrade test sha256('vid') = '1ff838dc6ca9680d88455341118157d59a055fe6d0e3870f9c002847bebe4663'
/* 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-09-04 19:49:28 +02:00
CREATE INDEX IF NOT EXISTS sponsorTimes_hashedVideoID on sponsorTimes(hashedVideoID);
/* Bump version in config */
2020-08-30 23:33:56 +02:00
UPDATE config SET value = 3 WHERE key = "version";
COMMIT;