Skip to content

Commit

Permalink
update: staking_pool schema
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaghettiOverload committed Aug 22, 2023
1 parent a184c1b commit 667257d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
10 changes: 6 additions & 4 deletions database/scheme/000-initial_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@ CREATE INDEX staking_params_height_index ON staking_params (height);

CREATE TABLE staking_pool
(
one_row_id BOOLEAN NOT NULL DEFAULT TRUE PRIMARY KEY,
bonded_tokens DECIMAL NOT NULL,
not_bonded_tokens DECIMAL NOT NULL,
height DECIMAL NOT NULL,
one_row_id BOOLEAN NOT NULL DEFAULT TRUE PRIMARY KEY,
bonded_tokens TEXT NOT NULL,
not_bonded_tokens TEXT NOT NULL,
unbonding_tokens TEXT NOT NULL,
staked_not_bonded_tokens TEXT NOT NULL,
height BIGINT NOT NULL,
CHECK (one_row_id)
);
CREATE INDEX staking_pool_height_index ON staking_pool (height);
Expand Down
18 changes: 10 additions & 8 deletions hasura/metadata/databases/bdjuno/tables/public_staking_pool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ table:
name: staking_pool
schema: public
select_permissions:
- permission:
allow_aggregations: true
columns:
- height
- bonded_tokens
- not_bonded_tokens
filter: {}
role: anonymous
- permission:
allow_aggregations: true
columns:
- height
- bonded_tokens
- not_bonded_tokens
- unbonding_tokens
- staked_not_bonded_tokens
filter: {}
role: anonymous

0 comments on commit 667257d

Please sign in to comment.