mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-06-16 04:25:15 +00:00
Add migration script for channel bans table in the database.
This commit is contained in:
parent
a1a101c0f1
commit
5c22c1a738
9
src/db/3.ts
Normal file
9
src/db/3.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import * as db from "../database";
|
||||||
|
|
||||||
|
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)');
|
||||||
|
await db.query('INSERT INTO ch_bans(channel) SELECT username FROM users');
|
||||||
|
await db.query('INSERT INTO db_meta (version) VALUES (3)');
|
||||||
|
}
|
||||||
|
|
||||||
|
export { run }
|
Loading…
x
Reference in New Issue
Block a user