We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1671aba commit 748851eCopy full SHA for 748851e
README.rdoc
@@ -113,6 +113,8 @@ the gem's migrations that have not yet been applied to your database.
113
-> 0.0009s
114
...
115
116
+To rollback migrations, use <tt>Songkick::OAuth2::Model::Schema.rollback</tt>.
117
+
118
119
=== Model Mixins
120
lib/songkick/oauth2/schema.rb
@@ -10,6 +10,14 @@ class << self
10
alias :up :migrate
11
end
12
13
+ def self.rollback
14
+ ActiveRecord::Base.logger ||= Logger.new(StringIO.new)
15
+ ActiveRecord::Migrator.down(migrations_path)
16
+ end
17
+ class << self
18
+ alias :down :rollback
19
20
21
def self.migrations_path
22
File.expand_path('../schema', __FILE__)
23
0 commit comments