Class: Rails::Sequel::Migrations

Inherits:
Object
  • Object
show all
Defined in:
lib/sequel-rails/migrations.rb

Class Method Summary collapse

Class Method Details

.migrate_down!(version = nil) ⇒ Object



18
19
20
21
22
23
# File 'lib/sequel-rails/migrations.rb', line 18

def migrate_down!(version=nil)
  opts = {}
  opts[:target] = version.to_i if version

  ::Sequel::Migrator.run(::Sequel::Model.db, "db/migrate", opts)
end

.migrate_up!(version = nil) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/sequel-rails/migrations.rb', line 9

def migrate_up!(version=nil)
  opts = {}
  opts[:target] = version.to_i if version
  
  
  
  ::Sequel::Migrator.run(::Sequel::Model.db, "db/migrate", opts)
end