Class: ROM::Auth::Plugins::AuthenticationEventsPlugin::AuthenticationEventsMigration
- Inherits:
-
Migration
- Object
- Migration
- ROM::Auth::Plugins::AuthenticationEventsPlugin::AuthenticationEventsMigration
- Defined in:
- lib/rom/auth/plugins/authentication_events_plugin.rb
Instance Attribute Summary
Attributes inherited from Migration
Instance Method Summary collapse
Methods inherited from Migration
Constructor Details
This class inherits a constructor from ROM::Auth::Migration
Instance Method Details
#run ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/rom/auth/plugins/authentication_events_plugin.rb', line 53 def run auth_config = system.configuration config = self.config user_fk_name = auth_config.user_fk_name database.create_table(config.table_name) do primary_key :id foreign_key(user_fk_name, auth_config.users_table_name.to_sym) DateTime :started_at DateTime :ended_at String :identifier String :type Boolean :authenticated Boolean :success String :data # TODO login_ip, failure reason end end |