Merge pull request #366 from cerc-io/ian/v5_dev

missing upsert clause for schema.TableIPLDBlock
This commit is contained in:
Ian Norden 2023-04-13 13:34:51 -05:00 committed by GitHub
commit e3551263e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -71,9 +71,9 @@ func StorageNodeAppender(nodes *[]types2.StorageLeafNode) types2.StorageNodeSink
return nil
}
}
func IPLDMappingAppender(codeAndCodeHashes *[]types2.IPLD) types2.IPLDSink {
func IPLDMappingAppender(iplds *[]types2.IPLD) types2.IPLDSink {
return func(c types2.IPLD) error {
*codeAndCodeHashes = append(*codeAndCodeHashes, c)
*iplds = append(*iplds, c)
return nil
}
}

View File

@ -23,6 +23,7 @@ var TableIPLDBlock = Table{
{Name: "key", Type: Dtext},
{Name: "data", Type: Dbytea},
},
UpsertClause: OnConflict("block_number", "key"),
}
var TableNodeInfo = Table{