Skip to content

Commit

Permalink
add dividends table
Browse files Browse the repository at this point in the history
  • Loading branch information
jdogresorg committed Apr 23, 2024
1 parent 653fd6b commit 7f4979d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions indexer/sql/dividends.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
DROP TABLE IF EXISTS dividends;
CREATE TABLE dividends (
tx_index INTEGER UNSIGNED, -- Unique transaction index
tx_hash_id INTEGER UNSIGNED, -- id of record in index_transactions
block_index INTEGER UNSIGNED, -- block index of DIVIDEND transaction
source_id INTEGER UNSIGNED, -- id of record in index_addresses table
tick_id INTEGER UNSIGNED, -- id of record in index_ticks
dividend_tick_id INTEGER UNSIGNED, -- id of record in index_ticks
amount VARCHAR(250), -- Amount of token per unit
memo_id INTEGER UNSIGNED, -- id of record in index_memos table
status_id INTEGER UNSIGNED -- id of record in index_statuses table
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE INDEX tx_index ON dividends (tx_index);
CREATE INDEX source_id ON dividends (source_id);
CREATE INDEX tx_hash_id ON dividends (tx_hash_id);
CREATE INDEX block_index ON dividends (block_index);
CREATE INDEX tick_id ON dividends (tick_id);
CREATE INDEX dividend_tick_id ON dividends (dividend_tick_id);
CREATE INDEX memo_id ON dividends (memo_id);
CREATE INDEX status_id ON dividends (status_id);

0 comments on commit 7f4979d

Please sign in to comment.