Sha256: ea0f7d56972c1c64b1f749e793c6c860e34378313cac6780869c119c3777cd3e

Contents?: true

Size: 624 Bytes

Versions: 1

Compression:

Stored size: 624 Bytes

Contents

# Used by the webauthn feature
create_table :<%= table_prefix %>_webauthn_user_ids, id: false do |t|
  t.<%= primary_key_type(nil) %> :id, primary_key: true
  t.foreign_key :<%= table_prefix.pluralize %>, column: :id
  t.string :webauthn_id, null: false
end
create_table :<%= table_prefix %>_webauthn_keys, primary_key: [:<%= table_prefix %>_id, :webauthn_id] do |t|
  t.references :<%= table_prefix %>, foreign_key: true<%= primary_key_type(:type) %>
  t.string :webauthn_id
  t.string :public_key, null: false
  t.integer :sign_count, null: false
  t.datetime :last_use, null: false, default: <%= current_timestamp %>
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rodauth-rails-1.8.0 lib/generators/rodauth/migration/active_record/webauthn.erb