diff --git a/services b/services index 234fdb1..b2f96e3 100755 --- a/services +++ b/services @@ -187,11 +187,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"