I have initially the following multi_index table:
struct [[eosio::table]] plastict
{
uint64_t id;
uint64_t type;
uint64_t primary_key() const { return id; }
};
typedef eosio::multi_index<"items"_n, item> items;
items items_table;
I have deployed initial smart contract and now am I trying to add a new field to the the table items
. According to the info, I have found in a couple of EOS issues, I have added the new field at the end of the table struct:
struct [[eosio::table]] plastict
{
uint64_t id;
uint64_t type;
uint64_t state;
uint64_t primary_key() const { return id; }
};
typedef eosio::multi_index<"items"_n, item> items;
items items_table;
Unfortunately, after I have re-compiled and re-deployed the smart contract, when I try to read the table content, I get the following:
Error: {"code":500,"message":"Internal Service Error","error":{"code":3015013,"name":"unpack_exception","what":"Unpack data exception","details":[{"message":"Stream unexpectedly ended; unable to unpack field 'state' of struct 'item'","file":"abi_serializer.cpp","line_number":307,"method":"_binary_to_variant"}]}}
I don't need backward compatibility, thats why I am not wrapping the new field within binary_extension type, but I want to keep all the data already inserted and keep it accessible.
Appreciate any ideas and remarks ?