Skip to content

Commit

Permalink
Merge branch 'main' into feature/case-insensitive-symcode
Browse files Browse the repository at this point in the history
  • Loading branch information
0237h authored Aug 16, 2024
2 parents 1f27d0f + eab70c0 commit 7a3125b
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions create_schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,49 @@ SELECT contract,
timestamp AS updated_at_timestamp
FROM supply_change_events;
-- Table to store token transfers primarily indexed by the 'contract' field --
CREATE TABLE IF NOT EXISTS transfers_contract $ON_CLUSTER_DIRECTIVE
(
trx_id String,
action_index UInt32,
contract String,
symcode String,
from String,
to String,
quantity String,
memo String,
precision UInt32,
amount Int64,
value Float64,
block_num UInt64,
timestamp DateTime
)
ENGINE = $ENGINE_TYPE
PRIMARY KEY (contract, symcode, trx_id, action_index)
ORDER BY (contract, symcode, trx_id, action_index);
CREATE MATERIALIZED VIEW transfers_contract_mv $ON_CLUSTER_DIRECTIVE
TO transfers_contract
AS
SELECT trx_id,
action_index,
contract,
symcode,
from,
to,
quantity,
memo,
precision,
amount,
value,
block_num,
timestamp
FROM transfer_events;
-- Table to store token transfers primarily indexed by the 'from' field --
CREATE TABLE IF NOT EXISTS transfers_from $ON_CLUSTER_DIRECTIVE
(
Expand Down

0 comments on commit 7a3125b

Please sign in to comment.