aptos-labs / aptos-indexer-processors

Set of core processors that index data on the Aptos blockchain
https://aptos.dev/indexer/indexer-landing
60 stars 73 forks source link

[1/2][FA migration] Drop generated fields and add KS for unified #493

Closed bowenyang007 closed 3 months ago

bowenyang007 commented 3 months ago

Summary

Migration steps

  1. Swap Hasura to use current_unified_fungible_asset_balances [We're here] 2. Add a killswitch on current_unified_fungible_asset_balances_to_be_renamed
    1. In addition, make a migration dropping columns. We want to split dropping columns separately from adding columns back so that we can add the columns without going through diesel migration again.
    2. Deploy the change with KS turned on. This should create no downtime since column dropping is quick.
  2. Add generated columns back in dbeaver
  3. Create new migration with added columns. Then remove KS.
    1. Also need to spin up backfill processor with KS turned off.
  4. Swap Hasura to use current_unified_fungible_asset_balances_to_be_renamed

    Backfill later

    Devnet: 570187040 Testnet: 5776192143 Mainnet: 1660732247

Test

image Confirmed that table is empty image