An update to the issue raised: This was handled by defaulting the value I wanted to initalize to 0 on the onupgrade and once I have the result of the API call I wrote a function to replace all the values in the table to the gotten result. This although is not a perfect solution to the issue(as it would leave the table value defaulted to 0 instead of the number we need), will work.