Skip to content

Commit e7bc40d

Browse files
authored
[FA migration] Hasura changes for migration (#500)
* add transition json and modify final json for fa rollout * add instructions to readme
1 parent 836d83a commit e7bc40d

File tree

3 files changed

+2506
-38
lines changed

3 files changed

+2506
-38
lines changed

hasura-api/metadata-json/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Hasura Metadata
22
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.
33

4+
> [!WARNING]
5+
> (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.
6+
47
**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.

hasura-api/metadata-json/unified.json

Lines changed: 76 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"resource_version": 10,
2+
"resource_version": 38,
33
"metadata": {
44
"version": 3,
55
"sources": [
@@ -1350,6 +1350,59 @@
13501350
}
13511351
]
13521352
},
1353+
{
1354+
"table": {
1355+
"name": "current_fungible_asset_balances",
1356+
"schema": "public"
1357+
},
1358+
"object_relationships": [
1359+
{
1360+
"name": "metadata",
1361+
"using": {
1362+
"manual_configuration": {
1363+
"column_mapping": {
1364+
"asset_type": "asset_type"
1365+
},
1366+
"insertion_order": null,
1367+
"remote_table": {
1368+
"name": "fungible_asset_metadata",
1369+
"schema": "public"
1370+
}
1371+
}
1372+
}
1373+
}
1374+
],
1375+
"select_permissions": [
1376+
{
1377+
"role": "anonymous",
1378+
"permission": {
1379+
"columns": [
1380+
"amount",
1381+
"amount_v1",
1382+
"amount_v2",
1383+
"asset_type",
1384+
"asset_type_v1",
1385+
"asset_type_v2",
1386+
"is_frozen",
1387+
"is_primary",
1388+
"last_transaction_timestamp",
1389+
"last_transaction_timestamp_v1",
1390+
"last_transaction_timestamp_v2",
1391+
"last_transaction_version",
1392+
"last_transaction_version_v1",
1393+
"last_transaction_version_v2",
1394+
"owner_address",
1395+
"storage_id",
1396+
"token_standard"
1397+
],
1398+
"filter": {},
1399+
"limit": 100,
1400+
"allow_aggregations": true
1401+
},
1402+
"comment": ""
1403+
}
1404+
]
1405+
},
13531406
{
13541407
"table": {
13551408
"name": "current_objects",
@@ -1486,6 +1539,21 @@
14861539
}
14871540
}
14881541
}
1542+
},
1543+
{
1544+
"name": "current_royalty_v1",
1545+
"using": {
1546+
"manual_configuration": {
1547+
"column_mapping": {
1548+
"token_data_id": "token_data_id"
1549+
},
1550+
"insertion_order": null,
1551+
"remote_table": {
1552+
"name": "current_token_royalty_v1",
1553+
"schema": "public"
1554+
}
1555+
}
1556+
}
14891557
}
14901558
],
14911559
"array_relationships": [
@@ -1709,50 +1777,23 @@
17091777
},
17101778
{
17111779
"table": {
1712-
"name": "current_unified_fungible_asset_balances_to_be_renamed",
1780+
"name": "current_token_royalty_v1",
17131781
"schema": "public"
17141782
},
1715-
"configuration": {
1716-
"column_config": {},
1717-
"custom_column_names": {},
1718-
"custom_name": "current_fungible_asset_balances",
1719-
"custom_root_fields": {}
1720-
},
1721-
"object_relationships": [
1722-
{
1723-
"name": "metadata",
1724-
"using": {
1725-
"manual_configuration": {
1726-
"column_mapping": {
1727-
"asset_type": "asset_type"
1728-
},
1729-
"insertion_order": null,
1730-
"remote_table": {
1731-
"name": "fungible_asset_metadata",
1732-
"schema": "public"
1733-
}
1734-
}
1735-
}
1736-
}
1737-
],
17381783
"select_permissions": [
17391784
{
17401785
"role": "anonymous",
17411786
"permission": {
17421787
"columns": [
1743-
"amount",
1744-
"asset_type",
1745-
"is_frozen",
1746-
"is_primary",
17471788
"last_transaction_timestamp",
17481789
"last_transaction_version",
1749-
"owner_address",
1750-
"storage_id",
1751-
"token_standard"
1790+
"payee_address",
1791+
"royalty_points_denominator",
1792+
"royalty_points_numerator",
1793+
"token_data_id"
17521794
],
17531795
"filter": {},
1754-
"limit": 100,
1755-
"allow_aggregations": true
1796+
"limit": 100
17561797
},
17571798
"comment": ""
17581799
}
@@ -2311,16 +2352,13 @@
23112352
"isolation_level": "read-committed",
23122353
"pool_settings": {
23132354
"connection_lifetime": 600,
2314-
"max_connections": 48
2355+
"max_connections": 100
23152356
},
23162357
"use_prepared_statements": false
23172358
}
23182359
}
23192360
}
23202361
],
2321-
"query_collections": [],
2322-
"allowlist": [],
2323-
"rest_endpoints": [],
23242362
"api_limits": {
23252363
"depth_limit": {
23262364
"global": 5,

0 commit comments

Comments
 (0)