code.vegaprotocol.io/vega@v0.79.0/datanode/sqlstore/migrations/0035_transfers.sql (about)

     1  -- +goose Up
     2  alter table transfers add column dispatch_strategy jsonb;
     3  update transfers set dispatch_strategy = json_build_object('assetForMetric', dispatch_metric_asset, 'metric', dispatch_metric, 'markets', dispatch_markets,'entityScope',1, 'individualScope',1,'stakingRequirement','0','notionalTimeWeightedAveragePositionRequirement','0','windowLength',1,'lockPeriod',0,'distributionStrategy',1);
     4  DROP VIEW IF EXISTS transfers_current;
     5  alter table transfers drop column dispatch_metric_asset;
     6  alter table transfers drop column dispatch_metric;
     7  alter table transfers drop column dispatch_markets;
     8  CREATE VIEW transfers_current AS ( SELECT DISTINCT ON (id, from_account_id, to_account_id) * FROM transfers ORDER BY id, from_account_id, to_account_id, vega_time DESC);