Browse Source

Implements a reset attempt count to prevent guessing codes.

master
Zed A. Shaw 1 month ago
parent
commit
794ba97f13
  1. 12
      migrations/20210911191222_user_reset_count.cjs

12
migrations/20210911191222_user_reset_count.cjs

@ -0,0 +1,12 @@
exports.up = async (knex) => {
// using async/await lets you work with multiple tables in one up/down
await knex.schema.alterTable('user', (table) => {
table.integer("reset_count").defaultsTo(0).notNullable();
});
}
exports.down = async (knex) => {
return await knex.schema.alterTable('user', (table) => {
table.dropColumn("reset_count");
});
}
Loading…
Cancel
Save