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

[2/2][FA migration] Complete fa migration and rename table #494

Closed bowenyang007 closed 3 months ago

bowenyang007 commented 3 months ago
  1. Swap Hasura to use current_unified_fungible_asset_balances
  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.

[This PR]

  1. Add generated columns back in dbeaver
  2. Create new migration with added columns. Then remove KS.
  3. Rename current_fungible_asset_balances to current_fungible_asset_balances_legacy
  4. Rename current_unified_fungible_asset_balances_to_be_renamed to current_fungible_asset_balances