diff --git a/services b/services index 01d3d4c..041cc14 100755 --- a/services +++ b/services @@ -185,11 +185,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"