From 2d51b5259f3dab59f1d8112d787739eec1d80e7e Mon Sep 17 00:00:00 2001 From: Sebastien Guillemot Date: Sat, 27 Apr 2024 07:03:28 +0900 Subject: [PATCH] remove deprecated actionTxId column --- .../models/projected_nft/projectedNftRangeByAddress.queries.ts | 3 +-- .../app/models/projected_nft/projectedNftRangeByAddress.sql | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/webserver/server/app/models/projected_nft/projectedNftRangeByAddress.queries.ts b/webserver/server/app/models/projected_nft/projectedNftRangeByAddress.queries.ts index b65e41b3..93002bfb 100644 --- a/webserver/server/app/models/projected_nft/projectedNftRangeByAddress.queries.ts +++ b/webserver/server/app/models/projected_nft/projectedNftRangeByAddress.queries.ts @@ -26,7 +26,7 @@ export interface ISqlProjectedNftRangeByAddressQuery { result: ISqlProjectedNftRangeByAddressResult; } -const sqlProjectedNftRangeByAddressIR: any = {"usedParamSet":{"owner_address":true,"after_tx_id":true,"until_tx_id":true,"limit":true},"params":[{"name":"owner_address","required":true,"transform":{"type":"scalar"},"locs":[{"a":1456,"b":1470}]},{"name":"after_tx_id","required":true,"transform":{"type":"scalar"},"locs":[{"a":1496,"b":1508}]},{"name":"until_tx_id","required":true,"transform":{"type":"scalar"},"locs":[{"a":1535,"b":1547}]},{"name":"limit","required":true,"transform":{"type":"scalar"},"locs":[{"a":1649,"b":1655}]}],"statement":"SELECT\n json_agg(json_build_object(\n 'ownerAddress', encode(\"ProjectedNFT\".owner_address, 'hex'),\n 'previousUtxoTxHash', encode(\"ProjectedNFT\".previous_utxo_tx_hash, 'hex'),\n 'previousTxOutputIndex', \"ProjectedNFT\".previous_utxo_tx_output_index,\n 'actionOutputIndex', CASE\n WHEN \"TransactionOutput\".output_index = NULL THEN NULL\n ELSE \"TransactionOutput\".output_index\n END,\n 'actionTxId', encode(\"Transaction\".hash, 'hex'),\n 'policyId', \"ProjectedNFT\".policy_id,\n 'assetName', \"ProjectedNFT\".asset_name,\n 'amount', \"ProjectedNFT\".amount,\n 'status', CASE\n WHEN \"ProjectedNFT\".operation = 0 THEN 'Lock'\n WHEN \"ProjectedNFT\".operation = 1 THEN 'Unlocking'\n WHEN \"ProjectedNFT\".operation = 2 THEN 'Claim'\n ELSE 'Invalid'\n END,\n 'plutusDatum', encode(\"ProjectedNFT\".plutus_datum, 'hex'),\n 'forHowLong', \"ProjectedNFT\".for_how_long,\n 'actionSlot', \"Block\".slot\n )) as \"payload!\",\n encode(\"Block\".hash, 'hex') as \"block!\",\n encode(\"Transaction\".hash, 'hex') as \"tx_id!\"\nFROM \"ProjectedNFT\"\n LEFT JOIN \"TransactionOutput\" ON \"TransactionOutput\".id = \"ProjectedNFT\".hololocker_utxo_id\n JOIN \"Transaction\" ON \"Transaction\".id = \"ProjectedNFT\".tx_id\n JOIN \"Block\" ON \"Transaction\".block_id = \"Block\".id\nWHERE\n encode(\"ProjectedNFT\".owner_address, 'hex') = :owner_address! AND\n\t\"Transaction\".id > :after_tx_id! AND\n\t\"Transaction\".id <= :until_tx_id!\nGROUP BY (\"Block\".id, \"Transaction\".id)\nORDER BY (\"Block\".height, \"Transaction\".tx_index) ASC\nLIMIT :limit!"}; +const sqlProjectedNftRangeByAddressIR: any = {"usedParamSet":{"owner_address":true,"after_tx_id":true,"until_tx_id":true,"limit":true},"params":[{"name":"owner_address","required":true,"transform":{"type":"scalar"},"locs":[{"a":1399,"b":1413}]},{"name":"after_tx_id","required":true,"transform":{"type":"scalar"},"locs":[{"a":1439,"b":1451}]},{"name":"until_tx_id","required":true,"transform":{"type":"scalar"},"locs":[{"a":1478,"b":1490}]},{"name":"limit","required":true,"transform":{"type":"scalar"},"locs":[{"a":1592,"b":1598}]}],"statement":"SELECT\n json_agg(json_build_object(\n 'ownerAddress', encode(\"ProjectedNFT\".owner_address, 'hex'),\n 'previousUtxoTxHash', encode(\"ProjectedNFT\".previous_utxo_tx_hash, 'hex'),\n 'previousTxOutputIndex', \"ProjectedNFT\".previous_utxo_tx_output_index,\n 'actionOutputIndex', CASE\n WHEN \"TransactionOutput\".output_index = NULL THEN NULL\n ELSE \"TransactionOutput\".output_index\n END,\n 'policyId', \"ProjectedNFT\".policy_id,\n 'assetName', \"ProjectedNFT\".asset_name,\n 'amount', \"ProjectedNFT\".amount,\n 'status', CASE\n WHEN \"ProjectedNFT\".operation = 0 THEN 'Lock'\n WHEN \"ProjectedNFT\".operation = 1 THEN 'Unlocking'\n WHEN \"ProjectedNFT\".operation = 2 THEN 'Claim'\n ELSE 'Invalid'\n END,\n 'plutusDatum', encode(\"ProjectedNFT\".plutus_datum, 'hex'),\n 'forHowLong', \"ProjectedNFT\".for_how_long,\n 'actionSlot', \"Block\".slot\n )) as \"payload!\",\n encode(\"Block\".hash, 'hex') as \"block!\",\n encode(\"Transaction\".hash, 'hex') as \"tx_id!\"\nFROM \"ProjectedNFT\"\n LEFT JOIN \"TransactionOutput\" ON \"TransactionOutput\".id = \"ProjectedNFT\".hololocker_utxo_id\n JOIN \"Transaction\" ON \"Transaction\".id = \"ProjectedNFT\".tx_id\n JOIN \"Block\" ON \"Transaction\".block_id = \"Block\".id\nWHERE\n encode(\"ProjectedNFT\".owner_address, 'hex') = :owner_address! AND\n\t\"Transaction\".id > :after_tx_id! AND\n\t\"Transaction\".id <= :until_tx_id!\nGROUP BY (\"Block\".id, \"Transaction\".id)\nORDER BY (\"Block\".height, \"Transaction\".tx_index) ASC\nLIMIT :limit!"}; /** * Query generated from SQL: @@ -40,7 +40,6 @@ const sqlProjectedNftRangeByAddressIR: any = {"usedParamSet":{"owner_address":tr * WHEN "TransactionOutput".output_index = NULL THEN NULL * ELSE "TransactionOutput".output_index * END, - * 'actionTxId', encode("Transaction".hash, 'hex'), * 'policyId', "ProjectedNFT".policy_id, * 'assetName', "ProjectedNFT".asset_name, * 'amount', "ProjectedNFT".amount, diff --git a/webserver/server/app/models/projected_nft/projectedNftRangeByAddress.sql b/webserver/server/app/models/projected_nft/projectedNftRangeByAddress.sql index 94471c58..37cae8a5 100644 --- a/webserver/server/app/models/projected_nft/projectedNftRangeByAddress.sql +++ b/webserver/server/app/models/projected_nft/projectedNftRangeByAddress.sql @@ -10,7 +10,6 @@ SELECT WHEN "TransactionOutput".output_index = NULL THEN NULL ELSE "TransactionOutput".output_index END, - 'actionTxId', encode("Transaction".hash, 'hex'), 'policyId', "ProjectedNFT".policy_id, 'assetName', "ProjectedNFT".asset_name, 'amount', "ProjectedNFT".amount,