3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 23:09:59 +00:00
zeppelin/migrations/20180707152000_create_mutes_table.js

18 lines
517 B
JavaScript
Raw Normal View History

2018-07-07 17:03:13 +03:00
exports.up = async function(knex) {
if (! await knex.schema.hasTable('mutes')) {
await knex.schema.createTable('mutes', table => {
table.bigInteger('guild_id').unsigned().notNullable();
table.bigInteger('user_id').unsigned().notNullable();
table.dateTime('created_at');
table.dateTime('expires_at');
table.primary(['guild_id', 'user_id']);
table.index(['expires_at']);
});
}
};
exports.down = async function(knex) {
await knex.schema.dropTableIfExists('mutes');
};