From 5887b2247cbb4c25b77b413669933f30e618e99c Mon Sep 17 00:00:00 2001 From: pshenmic Date: Fri, 27 Dec 2024 17:59:10 +0700 Subject: [PATCH 1/3] Add missing fields in the documents create --- packages/indexer/src/processor/psql/dao/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/indexer/src/processor/psql/dao/mod.rs b/packages/indexer/src/processor/psql/dao/mod.rs index 35a9907f..dc93887c 100644 --- a/packages/indexer/src/processor/psql/dao/mod.rs +++ b/packages/indexer/src/processor/psql/dao/mod.rs @@ -263,8 +263,7 @@ impl PostgresDAO { pub async fn get_document_by_identifier(&self, identifier: Identifier) -> Result, PoolError> { let client = self.connection_pool.get().await?; - let stmt = client.prepare_cached("SELECT documents.id, documents.identifier, \ - documents.document_type_name, documents.transition_type, \ + let stmt = client.prepare_cached("SELECT documents.id, documents.identifier,\ data_contracts.identifier,documents.owner,documents.price,\ documents.deleted,documents.revision,documents.is_system \ FROM documents \ From 0e71e6baddf04751c24510a9b8870087b5e300e6 Mon Sep 17 00:00:00 2001 From: pshenmic Date: Fri, 27 Dec 2024 18:10:19 +0700 Subject: [PATCH 2/3] Fix migrations --- ...tity_alias_st_hash.sql => V44__add_identity_alias_st_hash.sql} | 0 ...add_document_type_name.sql => V45__add_document_type_name.sql} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename packages/indexer/migrations/{V43__add_identity_alias_st_hash.sql => V44__add_identity_alias_st_hash.sql} (100%) rename packages/indexer/migrations/{V44__add_document_type_name.sql => V45__add_document_type_name.sql} (100%) diff --git a/packages/indexer/migrations/V43__add_identity_alias_st_hash.sql b/packages/indexer/migrations/V44__add_identity_alias_st_hash.sql similarity index 100% rename from packages/indexer/migrations/V43__add_identity_alias_st_hash.sql rename to packages/indexer/migrations/V44__add_identity_alias_st_hash.sql diff --git a/packages/indexer/migrations/V44__add_document_type_name.sql b/packages/indexer/migrations/V45__add_document_type_name.sql similarity index 100% rename from packages/indexer/migrations/V44__add_document_type_name.sql rename to packages/indexer/migrations/V45__add_document_type_name.sql From ea76b21ab917ef9b28a814938c70b44b11465441 Mon Sep 17 00:00:00 2001 From: pshenmic Date: Fri, 27 Dec 2024 19:00:12 +0700 Subject: [PATCH 3/3] Fix one more --- packages/indexer/src/processor/psql/dao/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/indexer/src/processor/psql/dao/mod.rs b/packages/indexer/src/processor/psql/dao/mod.rs index dc93887c..7b75657b 100644 --- a/packages/indexer/src/processor/psql/dao/mod.rs +++ b/packages/indexer/src/processor/psql/dao/mod.rs @@ -264,7 +264,7 @@ impl PostgresDAO { let client = self.connection_pool.get().await?; let stmt = client.prepare_cached("SELECT documents.id, documents.identifier,\ - data_contracts.identifier,documents.owner,documents.price,\ + documents.document_type_name,documents.transition_type,data_contracts.identifier,documents.owner,documents.price,\ documents.deleted,documents.revision,documents.is_system \ FROM documents \ LEFT JOIN data_contracts ON data_contracts.id = documents.data_contract_id \