#fabric #database #couchdb #fabric-chaincode #hyperledger-fabric #fabric #database #fabric-chaincode #hyperledger-fabric #couchdb


keerthycbe@...
 

I've a query on how we need to deal with data structure changes in chaincode. Lets say, you have deployed the chaincode in production and lot of data stored in ledger and world state db(Couchdb). If you have changed the data structure drastically in chaincode (Added/removed/changed some fields) for your next release, I would like to understand how to manage the old data in Couchdb. The new data with new data structure will be stored along with old data. While querying the data, client would be getting data with old and new structure. I've following questions with respect to this.
I'm not sure if there is a way to migrate old data as per new structure in Couchdb and Ledger. I understand we can't change data in World State DB alone as the data is computed based on the transactions in the ledger which is immutable. can you please guide what strategy should we follow to handle the data model significant changes in chaincode in production? 

Join fabric@lists.hyperledger.org to automatically receive all group messages.