i defined a table but i made a mistake putting the fields in wrong order within EOSLIB_SERIALIZE EOSLIB_SERIALIZE( tablename,(field1)(field4)(field3)(field2)); i did some insertions with emplace after realize the mistake and setup the corrrect order (and clean the table) EOSLIB_SERIALIZE( tablename,(field1)(field2)(field3)(field4)); i got the error "uniqueness constraint was violated " with an empty table
1 Answer
You need to delete all instances of the old database structure before you can mutate it, I believe an instance still exists in the ether despite it not showing up anymore.
If you're just on a local testnet, reset the chain otherwise wipe the deployed contract and re-deploy a fresh copy.
-
i follow your recomendations , and now everithing works fine, thanks a lot– KrisKoinCommented Apr 21, 2019 at 4:13