Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index definitions #168

Open
potomak opened this issue Oct 6, 2016 · 0 comments
Open

Add index definitions #168

potomak opened this issue Oct 6, 2016 · 0 comments

Comments

@potomak
Copy link
Member

potomak commented Oct 6, 2016

Some of the indexes that are present in the production DB, miss definitions in their relative model class, let's add them.

  • projects
    • { v: 1, key: { user_id: 1 }, name: "user_id_1", ns: "tomatoes_production.projects", background: true, safe: true }
  • tomatoes
    • { v: 1, key: { created_at: 1 }, name: "created_at_1", ns: "tomatoes_production.tomatoes", background: true }
    • { v: 1, key: { user_id: 1, created_at: -1 }, name: "user_id_1_created_at_-1", ns: "tomatoes_production.tomatoes", background: true, safe: true }
    • { v: 1, key: { created_at: -1 }, name: "created_at_-1", ns: "tomatoes_production.tomatoes", background: true, safe: true }
    • { v: 1, key: { user_id: 1 }, name: "user_id_1", ns: "tomatoes_production.tomatoes", background: true, safe: true }
  • user_ranking_all_times
    • { v: 1, key: { value: 1 }, name: "value_1", ns: "tomatoes_production.user_ranking_all_times", background: true }
  • user_ranking_this_months
    • { v: 1, key: { value: 1 }, name: "value_1", ns: "tomatoes_production.user_ranking_this_months", background: true }
  • user_ranking_this_weeks
    • { v: 1, key: { value: 1 }, name: "value_1", ns: "tomatoes_production.user_ranking_this_weeks", background: true }
  • user_ranking_todays
    • { v: 1, key: { value: 1 }, name: "value_1", ns: "tomatoes_production.user_ranking_todays", background: true }
  • users
    • { v: 1, key: { "authorizations.uid": 1 }, name: "authorizations.uid_1", ns: "tomatoes_production.users", background: true }
    • `{ v: 1, key: { "authorizations.provider": 1 }, name: "authorizations.provider_1", ns: "tomatoes_production.users", background: true }
    • { v: 1, key: { created_at: -1 }, name: "created_at_-1", ns: "tomatoes_production.users", background: true, safe: true }

See also https://docs.mongodb.com/ruby-driver/master/tutorials/5.1.0/mongoid-indexes/.

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

No branches or pull requests

1 participant