Class: Songkick::OAuth2::Schema

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

Class Method Summary collapse

Class Method Details

.migrateObject Also known as: up



5
6
7
8
# File 'lib/songkick/oauth2/schema.rb', line 5

def self.migrate
  ActiveRecord::Base.logger ||= Logger.new(StringIO.new)
  ActiveRecord::Migrator.up(migrations_path)
end

.migrations_pathObject



21
22
23
# File 'lib/songkick/oauth2/schema.rb', line 21

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

.rollbackObject Also known as: down



13
14
15
16
# File 'lib/songkick/oauth2/schema.rb', line 13

def self.rollback
  ActiveRecord::Base.logger ||= Logger.new(StringIO.new)
  ActiveRecord::Migrator.down(migrations_path)
end