Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

rake db:mongoid:create_indexes doesn't seem to create indexes #217

Closed
barmstrong opened this Issue Mar 16, 2013 · 2 comments

Comments

Projects
None yet
3 participants

I'm not seeing any of the doorkeeper models in the output from that rake command. And the indexes aren't on the db. Any idea why it wouldn't get created with this command?

Specifically I'm looking at indexes on the oauth_access_tokens collection.

Contributor

felipeelias commented Mar 26, 2013

Hey, I think this is duplicated issue as #165. Sorry if I closed without solving it 😦

I think that the mongoid task does not know that there are models in doorkeeper gem. An approach would be to create a specific rake task to create indexes on doorkeeper models.

Something like:

namespace :doorkeeper do
  task :create_indexes => :environment do
    Doorkeeper::Application.create_indexes
    Doorkeeper::AccessGrant.create_indexes
    Doorkeeper::AccessToken.create_indexes
  end
end

(warning, didn't test this snippet)

Contributor

felipeelias commented Apr 4, 2013

@barmstrong did it solve your problem?

@tute tute closed this Apr 12, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment