tomatoes icon indicating copy to clipboard operation
tomatoes copied to clipboard

Add index definitions

Open potomak opened this issue 9 years ago • 0 comments

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/.

potomak avatar Oct 06 '16 00:10 potomak