This commit is contained in:
amartynov 2015-09-15 14:31:05 +03:00
parent b09968684f
commit 773ba77357

View File

@ -52,12 +52,12 @@ module Connectors
end end
def create_indexes def create_indexes
info = self.collection.index_information info = collection.index_information
unless info["created_at_1"] unless info["created_at_1"]
self.collection.create_index({created_at: Mongo::ASCENDING}) collection.create_index({created_at: Mongo::ASCENDING})
end end
unless info["project_1_deploy_env_1_created_at_1"] unless info["project_1_deploy_env_1_created_at_1"]
self.collection.create_index({project: Mongo::ASCENDING, deploy_env: Mongo::ASCENDING, created_at: Mongo::ASCENDING}) collection.create_index({project: Mongo::ASCENDING, deploy_env: Mongo::ASCENDING, created_at: Mongo::ASCENDING})
end end
end end