auth_attempts.cjs 277 Bytes
const tableName = 'auth_attempts'

function buildTable(t) {
  t.increments('id').primary()
  t.string('key').notNullable()
  t.string('ip', 64).nullable()
  t.datetime('at', { precision: 3 }).notNullable()
  t.index(['key', 'at'])
}

module.exports = { tableName, buildTable }