Class: RockOAuth::Schema
- Inherits:
-
Object
- Object
- RockOAuth::Schema
- Defined in:
- lib/rockoauth/schema.rb
Class Method Summary collapse
- .migrate ⇒ Object (also: up)
- .migrations_path ⇒ Object
- .rollback ⇒ Object (also: down)
Class Method Details
.migrate ⇒ Object Also known as: up
4 5 6 7 |
# File 'lib/rockoauth/schema.rb', line 4 def self.migrate ActiveRecord::Base.logger ||= Logger.new(StringIO.new) ActiveRecord::Migrator.up(migrations_path) end |
.migrations_path ⇒ Object
20 21 22 |
# File 'lib/rockoauth/schema.rb', line 20 def self.migrations_path File.('../schema', __FILE__) end |
.rollback ⇒ Object Also known as: down
12 13 14 15 |
# File 'lib/rockoauth/schema.rb', line 12 def self.rollback ActiveRecord::Base.logger ||= Logger.new(StringIO.new) ActiveRecord::Migrator.down(migrations_path) end |