near / near-indexer-for-explorer

Watch NEAR network and store all the data from NEAR blockchain to PostgreSQL database
https://near-indexers.io/docs/projects/near-indexer-for-explorer
GNU General Public License v3.0
124 stars 56 forks source link

fix: update python script inside account_changes adding index_in_block migration #145

Closed telezhnaya closed 3 years ago

telezhnaya commented 3 years ago

sqlalchemy is too smart, it decides whether we need to commit changes based on first line of raw sql statement. https://stackoverflow.com/questions/45347565/executing-multiple-statements-with-postgresql-via-sqlalchemy-does-not-persist-ch It was a script from Bohdan https://github.com/near/near-indexer-for-explorer/pull/99#issuecomment-838871700 Bohdan's update started from UPDATE and everything worked. Mine started from WITH and sqlalchemy decided not to commit anything because of that. We lost some logging, but at least it works

It runs now on 34.141.101.9 for testnet