Skip to content

Commit

Permalink
[FA migration] Hasura changes for migration (#500)
Browse files Browse the repository at this point in the history
* add transition json and modify final json for fa rollout

* add instructions to readme
  • Loading branch information
bowenyang007 authored Sep 5, 2024
1 parent 836d83a commit e7bc40d
Show file tree
Hide file tree
Showing 3 changed files with 2,506 additions and 38 deletions.
3 changes: 3 additions & 0 deletions hasura-api/metadata-json/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Hasura Metadata
This directory contains the metadata we use for Hasura. The "metadata" is what Hasura calls the file that configures pretty much everything about a Hasura instance, including table schemas, relations, DB connection configuration, how metrics are exported, etc.

> [!WARNING]
> (09/25/2024) We added a new unified_transition.json to facilitate Fungible Asset Migration. Please use this file in Hasura while the new table is backfilling.
**Note for Labs folks**: Use the file in [internal-ops](https://github.com/aptos-labs/internal-ops/blob/main/infra/apps/aptos-indexer-processors/metadata) instead. See the README there.
114 changes: 76 additions & 38 deletions hasura-api/metadata-json/unified.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"resource_version": 10,
"resource_version": 38,
"metadata": {
"version": 3,
"sources": [
Expand Down Expand Up @@ -1350,6 +1350,59 @@
}
]
},
{
"table": {
"name": "current_fungible_asset_balances",
"schema": "public"
},
"object_relationships": [
{
"name": "metadata",
"using": {
"manual_configuration": {
"column_mapping": {
"asset_type": "asset_type"
},
"insertion_order": null,
"remote_table": {
"name": "fungible_asset_metadata",
"schema": "public"
}
}
}
}
],
"select_permissions": [
{
"role": "anonymous",
"permission": {
"columns": [
"amount",
"amount_v1",
"amount_v2",
"asset_type",
"asset_type_v1",
"asset_type_v2",
"is_frozen",
"is_primary",
"last_transaction_timestamp",
"last_transaction_timestamp_v1",
"last_transaction_timestamp_v2",
"last_transaction_version",
"last_transaction_version_v1",
"last_transaction_version_v2",
"owner_address",
"storage_id",
"token_standard"
],
"filter": {},
"limit": 100,
"allow_aggregations": true
},
"comment": ""
}
]
},
{
"table": {
"name": "current_objects",
Expand Down Expand Up @@ -1486,6 +1539,21 @@
}
}
}
},
{
"name": "current_royalty_v1",
"using": {
"manual_configuration": {
"column_mapping": {
"token_data_id": "token_data_id"
},
"insertion_order": null,
"remote_table": {
"name": "current_token_royalty_v1",
"schema": "public"
}
}
}
}
],
"array_relationships": [
Expand Down Expand Up @@ -1709,50 +1777,23 @@
},
{
"table": {
"name": "current_unified_fungible_asset_balances_to_be_renamed",
"name": "current_token_royalty_v1",
"schema": "public"
},
"configuration": {
"column_config": {},
"custom_column_names": {},
"custom_name": "current_fungible_asset_balances",
"custom_root_fields": {}
},
"object_relationships": [
{
"name": "metadata",
"using": {
"manual_configuration": {
"column_mapping": {
"asset_type": "asset_type"
},
"insertion_order": null,
"remote_table": {
"name": "fungible_asset_metadata",
"schema": "public"
}
}
}
}
],
"select_permissions": [
{
"role": "anonymous",
"permission": {
"columns": [
"amount",
"asset_type",
"is_frozen",
"is_primary",
"last_transaction_timestamp",
"last_transaction_version",
"owner_address",
"storage_id",
"token_standard"
"payee_address",
"royalty_points_denominator",
"royalty_points_numerator",
"token_data_id"
],
"filter": {},
"limit": 100,
"allow_aggregations": true
"limit": 100
},
"comment": ""
}
Expand Down Expand Up @@ -2311,16 +2352,13 @@
"isolation_level": "read-committed",
"pool_settings": {
"connection_lifetime": 600,
"max_connections": 48
"max_connections": 100
},
"use_prepared_statements": false
}
}
}
],
"query_collections": [],
"allowlist": [],
"rest_endpoints": [],
"api_limits": {
"depth_limit": {
"global": 5,
Expand Down
Loading

0 comments on commit e7bc40d

Please sign in to comment.