Class: ROM::SQL::Migration

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

Constant Summary collapse

DEFAULT_PATH =
'db/migrate'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.connectionObject

Returns the value of attribute connection.



10
11
12
# File 'lib/rom/sql/migration.rb', line 10

def connection
  @connection
end

.pathObject



12
13
14
# File 'lib/rom/sql/migration.rb', line 12

def path
  @path || DEFAULT_PATH
end

Class Method Details

.create(&block) ⇒ Object



20
21
22
# File 'lib/rom/sql/migration.rb', line 20

def create(&block)
  ::Sequel.migration(&block)
end

.run(options = {}) ⇒ Object



16
17
18
# File 'lib/rom/sql/migration.rb', line 16

def run(options = {})
  ::Sequel::Migrator.run(connection, path, options)
end