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:
parent
847ee11195
commit
16be52a5e7
10 changed files with 167 additions and 10 deletions
15
migrations/20180801185500_create_spam_logs_table.js
Normal file
15
migrations/20180801185500_create_spam_logs_table.js
Normal 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');
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue