import * as db from "../database"; import * as dirty from "dirty"; async function run () { await db.query('CREATE TABLE IF NOT EXISTS ch_bans(channel VARCHAR(25), target VARCHAR(45), time BIGINT, length INT DEFAULT 30)'); console.log('!!! This migration has a race condition when run from the `npm run migrate` command. If thats how this was called, please re-run this migration manually.\n!!! Run `npm run v3-manual` to do so'); var bansdb = new dirty('./config/bans.db') bansdb.on('load', async () => { bansdb.forEach(async (key, val) => { let ips = Object.keys(val); for(var i=0;i