File tree 2 files changed +3
-13
lines changed
2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,8 @@ exports.up = pgm => {
6
6
pgm . addColumn ( 'blocks' , {
7
7
tx_total_size : {
8
8
type : 'int' ,
9
- notNull : true ,
10
- default : 0 ,
11
9
} ,
12
10
} ) ;
13
- pgm . sql ( `
14
- UPDATE blocks
15
- SET tx_total_size = (
16
- SELECT SUM(OCTET_LENGTH(raw_tx))
17
- FROM txs
18
- WHERE index_block_hash = blocks.index_block_hash
19
- )
20
- ` ) ;
21
11
} ;
22
12
23
13
exports . down = pgm => {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export interface DbBlock {
22
22
execution_cost_runtime : number ;
23
23
execution_cost_write_count : number ;
24
24
execution_cost_write_length : number ;
25
- tx_total_size : number ;
25
+ tx_total_size : number | null ;
26
26
tx_count : number ;
27
27
block_time : number ;
28
28
signer_bitvec : string | null ;
@@ -863,7 +863,7 @@ export interface BlockQueryResult {
863
863
execution_cost_runtime : string ;
864
864
execution_cost_write_count : string ;
865
865
execution_cost_write_length : string ;
866
- tx_total_size : number ;
866
+ tx_total_size : number | null ;
867
867
tx_count : number ;
868
868
signer_bitvec : string | null ;
869
869
tenure_height : number | null ;
@@ -1289,7 +1289,7 @@ export interface BlockInsertValues {
1289
1289
execution_cost_runtime : number ;
1290
1290
execution_cost_write_count : number ;
1291
1291
execution_cost_write_length : number ;
1292
- tx_total_size : number ;
1292
+ tx_total_size : number | null ;
1293
1293
tx_count : number ;
1294
1294
signer_bitvec : string | null ;
1295
1295
signer_signatures : PgBytea [ ] | null ;
You can’t perform that action at this time.
0 commit comments