Add database migrate for viewer tracking

pull/28/head
knotteye 2021-01-15 11:05:01 -06:00
parent 1b551a5b8f
commit 3d131980ae
1 changed files with 8 additions and 0 deletions

8
src/db/4.ts Normal file
View File

@ -0,0 +1,8 @@
import * as db from "../database";
async function run () {
await db.query('ALTER TABLE user_meta ADD viewers int UNSIGNED DEFAULT 0 AFTER live');
await db.query('INSERT INTO db_meta (version) VALUES (4)');
}
export { run }