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

Add persist plugin

This commit is contained in:
Dragory 2018-07-30 23:35:44 +03:00
parent e7734c558c
commit ad6afdfac1
10 changed files with 199 additions and 4 deletions

View file

@ -0,0 +1,17 @@
exports.up = async function(knex, Promise) {
if (! await knex.schema.hasTable('persisted_data')) {
await knex.schema.createTable('persisted_data', table => {
table.string('guild_id', 20).notNullable();
table.string('user_id', 20).notNullable();
table.string('roles', 1024).nullable().defaultTo(null);
table.string('nickname', 255).nullable().defaultTo(null);
table.integer('is_voice_muted').notNullable().defaultTo(0);
table.primary(['guild_id', 'user_id']);
});
}
};
exports.down = async function(knex, Promise) {
await knex.schema.dropTableIfExists('persisted_data');
};