From f945852ab1c646aff8a39bd368b8df4abb3ee70a Mon Sep 17 00:00:00 2001 From: Benoit Lavenier <benoit.lavenier@e-is.pro> Date: Wed, 31 May 2023 14:58:45 +0200 Subject: [PATCH] fix: Add more indexed columns, in the TX table --- .../dal/indexDAL/sqlite/SqliteTransactions.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/app/lib/dal/indexDAL/sqlite/SqliteTransactions.ts b/app/lib/dal/indexDAL/sqlite/SqliteTransactions.ts index 0298fd57c..4871d83b5 100644 --- a/app/lib/dal/indexDAL/sqlite/SqliteTransactions.ts +++ b/app/lib/dal/indexDAL/sqlite/SqliteTransactions.ts @@ -18,9 +18,7 @@ export class SqliteTransactions extends SqliteTable<DBTx> implements TxsDAO { "txs", { hash: new SqlNotNullableFieldDefinition("VARCHAR", true, 70), - block_number: new SqlNullableFieldDefinition( - "INT", - true /*need by getTxHistoryByPubkeyBetweenBlocks() */ + block_number: new SqlNullableFieldDefinition("INT", true /*need by getTxHistoryByPubkeyBetweenBlocks() */ ), locktime: new SqlNullableFieldDefinition("INT", false), version: new SqlNullableFieldDefinition("INT", false), @@ -37,8 +35,7 @@ export class SqliteTransactions extends SqliteTable<DBTx> implements TxsDAO { ), time: new SqlNullableFieldDefinition( "INT", - true /*need by getTxHistoryByPubkeyBetweenTimes() */ - ), + true /*need by getTxHistoryByPubkeyBetweenTimes() */ ), inputs: new SqlNullableFieldDefinition("JSON", false), unlocks: new SqlNullableFieldDefinition("JSON", false), outputs: new SqlNullableFieldDefinition("JSON", false), @@ -55,13 +52,8 @@ export class SqliteTransactions extends SqliteTable<DBTx> implements TxsDAO { 50 ) /* computed column - need by getTxHistoryXxx() */, recipients: new SqlNullableFieldDefinition("JSON", false), - written: new SqlNotNullableFieldDefinition( - "BOOLEAN", - true /* need by getTxHistoryMempool() */ - ), - removed: new SqlNotNullableFieldDefinition( - "BOOLEAN", - true /* need by getSandboxTs() */ + written: new SqlNotNullableFieldDefinition("BOOLEAN", true /* need by getTxHistoryMempool() */), + removed: new SqlNotNullableFieldDefinition("BOOLEAN", true /* need by getSandboxTs() */ ), received: new SqlNullableFieldDefinition("BOOLEAN", false), output_base: new SqlNullableFieldDefinition("INT", false), -- GitLab