2
3
4
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/generators/templates/migration.rb', line 2
def change
create_table :two_factor_auth_registrations do |t|
t.references :login, polymorphic: true, null: false, index: true
t.binary :key_handle, null: false, limit: 65 t.binary :public_key, null: false, limit: 10.kilobytes
t.binary :certificate, null: false, limit: 1.megabyte, default: ""
t.integer :counter, null: false, limit: 5, default: 0 t.timestamp :last_authenticated_at, null: false
t.timestamps
end
add_index :two_factor_auth_registrations, :key_handle
add_index :two_factor_auth_registrations, :last_authenticated_at
end
|