Skip to content

Commit

Permalink
Merge pull request doorkeeper-gem#762 from arion/fix/allow_migrations
Browse files Browse the repository at this point in the history
Check should not abort the actual migration
  • Loading branch information
tute committed Dec 9, 2015
2 parents 59cd234 + ce5773f commit 4d436c3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/doorkeeper/orm/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ def self.check_requirements!(_config)
Doorkeeper::Application.table_name
)
unless Doorkeeper::Application.new.attributes.include?("scopes")
fail <<-MSG.squish
migration_path = '../../../generators/doorkeeper/templates/add_scopes_to_oauth_applications.rb'
puts <<-MSG.squish
[doorkeeper] Missing column: `oauth_applications.scopes`.
Run `rails generate doorkeeper:application_scopes
&& rake db:migrate` to add it.
Create the following migration and run `rake db:migrate`.
MSG
puts File.read(File.expand_path(migration_path, __FILE__))
end
end
end
Expand Down

0 comments on commit 4d436c3

Please sign in to comment.