Class: ROM::Auth::Migration
- Inherits:
-
Object
- Object
- ROM::Auth::Migration
- Defined in:
- lib/rom/auth/migration.rb
Direct Known Subclasses
Plugins::AuthenticationCredentialsPlugin::AuthenticationCredentialsMigration, Plugins::AuthenticationEventsPlugin::AuthenticationEventsMigration, Plugins::LockdownPlugin::LockdownMigration
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#setup ⇒ Object
readonly
Returns the value of attribute setup.
-
#system ⇒ Object
readonly
Returns the value of attribute system.
Instance Method Summary collapse
- #column_exists?(table, column) ⇒ Boolean
-
#initialize(system, setup, config) ⇒ Migration
constructor
A new instance of Migration.
- #run ⇒ Object
Constructor Details
#initialize(system, setup, config) ⇒ Migration
Returns a new instance of Migration.
5 6 7 8 9 |
# File 'lib/rom/auth/migration.rb', line 5 def initialize(system, setup, config) @system = system @setup = setup @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/rom/auth/migration.rb', line 3 def config @config end |
#setup ⇒ Object (readonly)
Returns the value of attribute setup.
3 4 5 |
# File 'lib/rom/auth/migration.rb', line 3 def setup @setup end |
#system ⇒ Object (readonly)
Returns the value of attribute system.
3 4 5 |
# File 'lib/rom/auth/migration.rb', line 3 def system @system end |
Instance Method Details
#column_exists?(table, column) ⇒ Boolean
11 12 13 |
# File 'lib/rom/auth/migration.rb', line 11 def column_exists?(table, column) database.schema(table).find{ |col| col.first == column } end |
#run ⇒ Object
15 16 17 |
# File 'lib/rom/auth/migration.rb', line 15 def run raise NotImplementedError end |