Skip to content

Commit

Permalink
chore: add created_at and mmore hasura metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangtv49 committed Nov 27, 2023
1 parent c90bb95 commit 7eb64d6
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ select_permissions:
- send_asset_transfer
- total_asset_transfer
- total_channel
- created_at
filter: {}
limit: 100
allow_aggregations: true
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ select_permissions:
- send_asset_transfer
- total_asset_transfer
- total_channel
- created_at
filter: {}
limit: 100
allow_aggregations: true
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ select_permissions:
- send_asset_transfer
- total_asset_transfer
- total_channel
- created_at
filter: {}
limit: 100
allow_aggregations: true
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ select_permissions:
- send_asset_transfer
- total_asset_transfer
- total_channel
- created_at
filter: {}
limit: 100
allow_aggregations: true
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ select_permissions:
- send_asset_transfer
- total_asset_transfer
- total_channel
- created_at
filter: {}
limit: 100
allow_aggregations: true
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ select_permissions:
- send_asset_transfer
- total_asset_transfer
- total_channel
- created_at
filter: {}
limit: 100
allow_aggregations: true
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export async function up(knex: Knex): Promise<void> {
SUM(COALESCE(open_channel.open_channel, 0)) AS open_channel,
SUM(COALESCE(ics20.total_asset_transfer, 0)) AS total_asset_transfer,
SUM(COALESCE(ics20.send_asset_transfer, 0)) AS send_asset_transfer,
SUM(COALESCE(ics20.receive_asset_transfer, 0)) AS receive_asset_transfer
SUM(COALESCE(ics20.receive_asset_transfer, 0)) AS receive_asset_transfer,
NOW() AS created_at
FROM
ibc_channel
INNER JOIN ibc_connection ON ibc_connection.id = ibc_channel.ibc_connection_id
Expand All @@ -18,7 +19,7 @@ export async function up(knex: Knex): Promise<void> {
(
SELECT ibc_channel.channel_id, Count(ibc_channel.id) AS open_channel
FROM ibc_channel
WHERE ibc_channel.state = 'OPEN'
WHERE ibc_channel.state IN('OPEN', 'STATE_OPEN')
GROUP BY ibc_channel.channel_id
) AS open_channel
ON ibc_channel.channel_id = open_channel.channel_id
Expand Down

0 comments on commit 7eb64d6

Please sign in to comment.