From 0f9e90f9f34ff0d311d38740b53789de7323260b Mon Sep 17 00:00:00 2001 From: Magic Cat Date: Mon, 4 Apr 2022 15:05:59 +0100 Subject: [PATCH 1/2] updated hasura metadata --- .../bdjuno/tables/public_account.yaml | 7 ++++ .../databases/bdjuno/tables/public_block.yaml | 18 ++++++++++ .../bdjuno/tables/public_message.yaml | 10 ++++++ .../bdjuno/tables/public_message_old.yaml | 18 ---------- .../bdjuno/tables/public_proposal_vote.yaml | 3 ++ .../bdjuno/tables/public_transaction.yaml | 11 ++++--- .../bdjuno/tables/public_transaction_old.yaml | 33 ------------------- .../bdjuno/tables/public_validator.yaml | 7 ++++ .../tables/public_validator_voting_power.yaml | 3 ++ .../databases/bdjuno/tables/tables.yaml | 2 -- 10 files changed, 54 insertions(+), 58 deletions(-) delete mode 100644 hasura/metadata/databases/bdjuno/tables/public_message_old.yaml delete mode 100644 hasura/metadata/databases/bdjuno/tables/public_transaction_old.yaml diff --git a/hasura/metadata/databases/bdjuno/tables/public_account.yaml b/hasura/metadata/databases/bdjuno/tables/public_account.yaml index edd9211a3..f3954d25c 100644 --- a/hasura/metadata/databases/bdjuno/tables/public_account.yaml +++ b/hasura/metadata/databases/bdjuno/tables/public_account.yaml @@ -40,6 +40,13 @@ array_relationships: table: name: validator_info schema: public +- name: vesting_accounts + using: + foreign_key_constraint_on: + column: address + table: + name: vesting_account + schema: public select_permissions: - permission: allow_aggregations: true diff --git a/hasura/metadata/databases/bdjuno/tables/public_block.yaml b/hasura/metadata/databases/bdjuno/tables/public_block.yaml index f3c0196ac..5c3f15fc2 100644 --- a/hasura/metadata/databases/bdjuno/tables/public_block.yaml +++ b/hasura/metadata/databases/bdjuno/tables/public_block.yaml @@ -31,6 +31,24 @@ array_relationships: remote_table: name: validator_voting_power schema: public +- name: proposal_deposits + using: + manual_configuration: + column_mapping: + height: height + insertion_order: null + remote_table: + name: proposal_deposit + schema: public +- name: proposal_votes + using: + manual_configuration: + column_mapping: + height: height + insertion_order: null + remote_table: + name: proposal_vote + schema: public select_permissions: - permission: allow_aggregations: true diff --git a/hasura/metadata/databases/bdjuno/tables/public_message.yaml b/hasura/metadata/databases/bdjuno/tables/public_message.yaml index aa572e712..891228b7f 100644 --- a/hasura/metadata/databases/bdjuno/tables/public_message.yaml +++ b/hasura/metadata/databases/bdjuno/tables/public_message.yaml @@ -11,6 +11,16 @@ object_relationships: insertion_order: column_mapping: transaction_hash: hash +- name: transactionByPartitionIdTransactionHash + using: + manual_configuration: + remote_table: + schema: public + name: transaction + insertion_order: + column_mapping: + transaction_hash: hash + partition_id: partition_id select_permissions: - permission: allow_aggregations: true diff --git a/hasura/metadata/databases/bdjuno/tables/public_message_old.yaml b/hasura/metadata/databases/bdjuno/tables/public_message_old.yaml deleted file mode 100644 index 0a39c5e33..000000000 --- a/hasura/metadata/databases/bdjuno/tables/public_message_old.yaml +++ /dev/null @@ -1,18 +0,0 @@ -table: - name: message_old - schema: public -object_relationships: -- name: transaction_old - using: - foreign_key_constraint_on: transaction_hash -select_permissions: -- permission: - allow_aggregations: true - columns: - - transaction_hash - - index - - type - - value - - involved_accounts_addresses - filter: {} - role: anonymous \ No newline at end of file diff --git a/hasura/metadata/databases/bdjuno/tables/public_proposal_vote.yaml b/hasura/metadata/databases/bdjuno/tables/public_proposal_vote.yaml index 8bc7be74f..30b70e033 100644 --- a/hasura/metadata/databases/bdjuno/tables/public_proposal_vote.yaml +++ b/hasura/metadata/databases/bdjuno/tables/public_proposal_vote.yaml @@ -5,6 +5,9 @@ object_relationships: - name: account using: foreign_key_constraint_on: voter_address +- name: block + using: + foreign_key_constraint_on: height - name: proposal using: foreign_key_constraint_on: proposal_id diff --git a/hasura/metadata/databases/bdjuno/tables/public_transaction.yaml b/hasura/metadata/databases/bdjuno/tables/public_transaction.yaml index 4d6c12884..60ca3f583 100644 --- a/hasura/metadata/databases/bdjuno/tables/public_transaction.yaml +++ b/hasura/metadata/databases/bdjuno/tables/public_transaction.yaml @@ -6,15 +6,16 @@ object_relationships: using: foreign_key_constraint_on: height array_relationships: -- name: messagesByTransactionHash +- name: messagesByTransactionHashPartitionId using: manual_configuration: + column_mapping: + hash: transaction_hash + partition_id: partition_id + insertion_order: null remote_table: - schema: public name: message - insertion_order: - column_mapping: - transaction_hash: hash + schema: public select_permissions: - permission: allow_aggregations: true diff --git a/hasura/metadata/databases/bdjuno/tables/public_transaction_old.yaml b/hasura/metadata/databases/bdjuno/tables/public_transaction_old.yaml deleted file mode 100644 index 88f916f85..000000000 --- a/hasura/metadata/databases/bdjuno/tables/public_transaction_old.yaml +++ /dev/null @@ -1,33 +0,0 @@ -table: - name: transaction_old - schema: public -object_relationships: -- name: block - using: - foreign_key_constraint_on: height -array_relationships: -- name: messagesByTransactionHashOld - using: - foreign_key_constraint_on: - column: transaction_hash - table: - name: message_old - schema: public -select_permissions: -- permission: - allow_aggregations: true - columns: - - hash - - height - - success - - messages - - memo - - signatures - - signer_infos - - fee - - gas_wanted - - gas_used - - raw_log - - logs - filter: {} - role: anonymous \ No newline at end of file diff --git a/hasura/metadata/databases/bdjuno/tables/public_validator.yaml b/hasura/metadata/databases/bdjuno/tables/public_validator.yaml index 91ed0ae3d..a2fbf8116 100644 --- a/hasura/metadata/databases/bdjuno/tables/public_validator.yaml +++ b/hasura/metadata/databases/bdjuno/tables/public_validator.yaml @@ -86,6 +86,13 @@ array_relationships: table: name: validator_voting_power schema: public +- name: proposal_validator_status_snapshots + using: + foreign_key_constraint_on: + column: validator_address + table: + name: proposal_validator_status_snapshot + schema: public select_permissions: - permission: allow_aggregations: true diff --git a/hasura/metadata/databases/bdjuno/tables/public_validator_voting_power.yaml b/hasura/metadata/databases/bdjuno/tables/public_validator_voting_power.yaml index 32051b447..6710ad5c4 100644 --- a/hasura/metadata/databases/bdjuno/tables/public_validator_voting_power.yaml +++ b/hasura/metadata/databases/bdjuno/tables/public_validator_voting_power.yaml @@ -2,6 +2,9 @@ table: name: validator_voting_power schema: public object_relationships: +- name: block + using: + foreign_key_constraint_on: height - name: validator using: foreign_key_constraint_on: validator_address diff --git a/hasura/metadata/databases/bdjuno/tables/tables.yaml b/hasura/metadata/databases/bdjuno/tables/tables.yaml index 06d2ed6a0..07e16cec8 100644 --- a/hasura/metadata/databases/bdjuno/tables/tables.yaml +++ b/hasura/metadata/databases/bdjuno/tables/tables.yaml @@ -12,7 +12,6 @@ - "!include public_gov_params.yaml" - "!include public_inflation.yaml" - "!include public_message.yaml" -- "!include public_message_old.yaml" - "!include public_mint_params.yaml" - "!include public_modules.yaml" - "!include public_pre_commit.yaml" @@ -31,7 +30,6 @@ - "!include public_token_price_history.yaml" - "!include public_token_unit.yaml" - "!include public_transaction.yaml" -- "!include public_transaction_old.yaml" - "!include public_validator.yaml" - "!include public_validator_commission.yaml" - "!include public_validator_description.yaml" From dffd2a06bd8dd262310ec2289a8d9eb7c00fda1e Mon Sep 17 00:00:00 2001 From: Magic Cat Date: Tue, 5 Apr 2022 22:27:21 +0100 Subject: [PATCH 2/2] updated metadata --- .../databases/bdjuno/tables/public_message.yaml | 10 ---------- .../databases/bdjuno/tables/public_transaction.yaml | 11 ----------- 2 files changed, 21 deletions(-) diff --git a/hasura/metadata/databases/bdjuno/tables/public_message.yaml b/hasura/metadata/databases/bdjuno/tables/public_message.yaml index 891228b7f..aa572e712 100644 --- a/hasura/metadata/databases/bdjuno/tables/public_message.yaml +++ b/hasura/metadata/databases/bdjuno/tables/public_message.yaml @@ -11,16 +11,6 @@ object_relationships: insertion_order: column_mapping: transaction_hash: hash -- name: transactionByPartitionIdTransactionHash - using: - manual_configuration: - remote_table: - schema: public - name: transaction - insertion_order: - column_mapping: - transaction_hash: hash - partition_id: partition_id select_permissions: - permission: allow_aggregations: true diff --git a/hasura/metadata/databases/bdjuno/tables/public_transaction.yaml b/hasura/metadata/databases/bdjuno/tables/public_transaction.yaml index 60ca3f583..8cd83c738 100644 --- a/hasura/metadata/databases/bdjuno/tables/public_transaction.yaml +++ b/hasura/metadata/databases/bdjuno/tables/public_transaction.yaml @@ -5,17 +5,6 @@ object_relationships: - name: block using: foreign_key_constraint_on: height -array_relationships: -- name: messagesByTransactionHashPartitionId - using: - manual_configuration: - column_mapping: - hash: transaction_hash - partition_id: partition_id - insertion_order: null - remote_table: - name: message - schema: public select_permissions: - permission: allow_aggregations: true