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

     1  -- +goose Up
     2  
     3  -- +goose StatementBegin
     4  do $$
     5  begin
     6      if not exists (select * from timescaledb_information.hypertables where hypertable_name = 'fees_stats_by_party') then
     7          perform create_hypertable('fees_stats_by_party', 'vega_time', chunk_time_interval => INTERVAL '1 day', migrate_data => true);
     8      end if;
     9  end $$;
    10  -- +goose StatementEnd
    11  
    12  -- +goose StatementBegin
    13  do $$
    14  begin
    15      if not exists (select * from timescaledb_information.hypertables where hypertable_name = 'paid_liquidity_fees') then
    16          perform create_hypertable('paid_liquidity_fees', 'vega_time', chunk_time_interval => INTERVAL '1 day', migrate_data => true);
    17      end if;
    18  end $$;
    19  -- +goose StatementEnd
    20  
    21  -- +goose Down
    22  
    23  -- nothing to do, we're not going to convert it back