Refresh specific columns in moralis database

Is there anyway to refresh the data in a column in the moralis database?

This is my use case: I am minting an NFT collection, and for the first few days, I have set reveal to off (which does not reveal the metadata of the NFT and displays a placeholder image). So when a user mints the NFT, the placeholder image gets stored in the moralis database under the token_uri column.

However, once I set reveal to true in my contract, the actual image is displayed along with the metadata, which means the token_uri value is different now, but this change does not get reflected in the moralis database.

Editing it manually will be quite cumbersome, so is there anyway to refresh the data?

Also, hitting refresh on moralis database doesn’t update existing records, it only adds new rows to the table.

Thank you!

you may need to use resync functionality if you change the token_uri in the smart contract:
https://docs.moralis.io/moralis-server/web3-sdk/token#resyncmetadata

Thanks for the tip!

However, I encounter the rate limit error when I tried to use this function. Checking the rate limit page:https://docs.moralis.io/misc/rate-limit#error-429-rate-limit-between-your-non-moralis-server-and-web3-api , the sync function under the API is worth 5 requests and I have been using getNFTsForContract which also uses 5 requests. Why is it that when I use the getNFTsForContract I have no issues but with resync I do?

because that resync medatada endpoint also has a different throttle cost and you can call it only once every second now

First issue:

I didn’t manage to call it at all though, the first time I tried I encountered the error

These were my rate limits:
{“x-rate-limit-limit”:“1500”

,“x-rate-limit-remaining”:“38”

,“x-rate-limit-remaining-ttl”:“38”

,“x-rate-limit-throttle-limit”:“60”

,“x-rate-limit-throttle-remaining”:“5”

,“x-rate-limit-throttle-remaining-ttl”:“5”

,“x-rate-limit-throttle-used”:“125”

,“x-rate-limit-used”:“1520”}

I’m worried that even if I upgrade my plan I won’t be able to execute this function

Second issue:

I went into the moralis dashboard and manually updated the token_uri values (I retrieved them from etherscan), but when I called getNFTsForContract on my web app, it still retrieves the old values. Is moralis database cached somewhere that is causing the old values to be retrieved? If so is there a way to clear my cache? (it is not my browser as I have cleared the cache on my browser as well as tried multiple browsers)

it looks like somehow the rate limit was reached

for second issue, getNFTsForContract doesn’t look in your local server database, there is a different database that is used for that, database that should be updated when you resync the token_uri or metadata