Class: ROM::Auth::Migration

Inherits:
Object
  • Object
show all
Defined in:
lib/rom/auth/migration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#configObject (readonly)

Returns the value of attribute config.



3
4
5
# File 'lib/rom/auth/migration.rb', line 3

def config
  @config
end

#setupObject (readonly)

Returns the value of attribute setup.



3
4
5
# File 'lib/rom/auth/migration.rb', line 3

def setup
  @setup
end

#systemObject (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

Returns:

  • (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

#runObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/rom/auth/migration.rb', line 15

def run
  raise NotImplementedError
end