mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-18 23:09:59 +00:00
18 lines
517 B
JavaScript
18 lines
517 B
JavaScript
![]() |
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');
|
||
|
};
|