diff --git a/services b/services index d591892..a20b345 100755 --- a/services +++ b/services @@ -176,11 +176,9 @@ addIoTDatabaseIndex () { conn = new Mongo(); db = conn.getDB("iotagentjson"); db.getCollectionNames().forEach(c=>db[c].drop()); - db.createCollection("devices"); db.devices.createIndex({"_id.service": 1, "_id.id": 1, "_id.type": 1}); db.devices.createIndex({"_id.type": 1}); db.devices.createIndex({"_id.id": 1}); - db.createCollection("groups"); db.groups.createIndex({"_id.resource": 1, "_id.apikey": 1, "_id.service": 1}); db.groups.createIndex({"_id.type": 1});' > /dev/null echo -e " \033[1;32mdone\033[0m"