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

     1  -- +goose Up
     2  
     3  create table time_weighted_notional_positions (
     4      asset_id bytea not null,
     5      party_id bytea not null,
     6      game_id bytea not null,
     7      epoch_seq bigint not null,
     8      time_weighted_notional_position hugeint not null,
     9      vega_time timestamp with time zone not null,
    10      primary key (asset_id, party_id, game_id, epoch_seq, vega_time)
    11  );
    12  
    13  select create_hypertable('time_weighted_notional_positions', 'vega_time', chunk_time_interval => interval '1 day', if_not_exists => true);
    14  
    15  -- +goose Down
    16  
    17  drop table if exists time_weighted_notional_positions;