How to delete a row in multi index table after upgrading a contract?
I insert a row in the target table, then upgrade the contract. After that i failed to insert a row with the same primary key. The error is:
could not insert object, most likely a uniqueness constraint was violated (13)
If I try to delete the old row first, the nodeos suggest:
3050003 eosio_assert_message_exception: eosio_assert_message assertion failure assertion failure with message: read {"s":"read"} That's the read only error, right? Then how can I clear the table and use it in the upgraded contract?
You need to reverse your contract with the old struct layout then delete by key.
@taokayan how to reverse the contract?
+1