CREATE TABLE IF NOT EXISTS transactions (
    id text NOT NULL,
    block BIGINT NOT NULL,
    offset_in_block BIGINT NOT NULL,
    zqversion BIGINT NOT NULL,
    amount numeric(76, 38),
    api_type text,
    code bytea,
    data bytea,
    gas_limit BIGINT NOT NULL,
    gas_price numeric(76, 38),
    nonce BIGINT,
    raw_receipt bytea,
    receipt jsonb,
    sender_public_key bytea,
    from_addr_zil varchar(40),
    from_addr_eth varchar(40),
    signature bytea,
    to_addr varchar(40),
    version BIGINT NOT NULL,
    cum_gas BIGINT,
    shard_id BIGINT,
    imported_from text NOT NULL,
    eth_transaction_index bigint,
    eth_value numeric,
    eth_input bytea,
    eth_v BIGINT,
    eth_r text,
    eth_s text,
    eth_transaction_type BIGINT
) PARTITION BY RANGE (block);