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

Consider removing `transaction_actions` table #176

Open frol opened 2 years ago

frol commented 2 years ago

transaction_actions table misleads people and so far in 100% of the cases (#172), it was not the right table to fetch the data.

Given that conversion receipt has exactly the same actions by NEAR Protocol design, I suggest we just point people towards action_receipt_actions table (currently connected through transactions.converted_into_receipt_id). I even would consider adding receipt_originated_from_transaction_hash column to action_receipt_actions table.

telezhnaya commented 2 years ago

receipt_originated_from_transaction_hash

I suggest just originated_from_transaction_hash The first option looks confusing to me

I like the general idea!

Bexanderthebex commented 2 years ago

I wonder if we can keep the original table for say 2 weeks then remove it once everyone have finally switched to the new table?

frol commented 2 years ago

@Bexanderthebex So far we kept this table for 3 months since the time I posted this issue. I think we will keep it for some time more, but I don't really see a way how we can gracefully migrate developers away from using this table. The only thing that comes to my mind is to post deprecation warnings in our weekly updates and in various chats. We will definitely start with heads up warnings and will leave at least 2 weeks to migrate

Bexanderthebex commented 2 years ago

Cool, I think leaving it for a little while before deprecating is the way to go @frol thanks.