3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 20:35:02 +00:00

feat: save deleted spam logs; server spam logs from a web server; update Knub to 9.6.4

This commit is contained in:
Dragory 2018-08-01 20:09:51 +03:00
parent 847ee11195
commit 16be52a5e7
10 changed files with 167 additions and 10 deletions

View file

@ -0,0 +1,15 @@
exports.up = async function(knex, Promise) {
if (! await knex.schema.hasTable('spam_logs')) {
await knex.schema.createTable('spam_logs', table => {
table.string('id', 36).notNullable().primary();
table.string('guild_id', 20).notNullable();
table.text('body', 'mediumtext').notNullable();
table.dateTime('created_at').defaultTo(knex.raw('NOW()')).notNullable();
table.dateTime('expires_at').nullable();
});
}
};
exports.down = async function(knex, Promise) {
await knex.schema.dropTableIfExists('spam_logs');
};