Open cdupont opened 5 years ago
Actions:
Used this script:
use waziup_history;
db.getCollectionNames().forEach(function(collname) {
db.getCollection(collname).copyTo(db.getSiblingDB('waziup')['waziup_history'])
print(collname + " done");
});
use waziup;
db.waziup_history.update({}, {$rename:{"entityID":"device_id", "attributeID":"sensor_id"}, $unset: {"entityType":""}}, false, true);
Problem now is to add the keycloak Id for existing sensors. Or should they be considered public? Script need to:
Data from MongoDB and MySQL need to be migrated to new format. Old format:
New format: