Class: RockOAuth::Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/rockoauth/schema.rb

Class Method Summary collapse

Class Method Details

.migrateObject 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_pathObject



20
21
22
# File 'lib/rockoauth/schema.rb', line 20

def self.migrations_path
  File.expand_path('../schema', __FILE__)
end

.rollbackObject 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