Skip to content

Commit

Permalink
specify varchar length for indexing [goreleaser]
Browse files Browse the repository at this point in the history
  • Loading branch information
nautsimon committed Nov 1, 2023
1 parent 141b7e1 commit a3972c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/sinner/db/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var (
// MessageStatus is the table holding the status of each message.
type MessageStatus struct {
// MessageHash is the message hash.
MessageHash string `gorm:"column:message_hash;primaryKey"`
MessageHash string `gorm:"type:varchar(64);column:message_hash;primaryKey"`
// OriginTxHash is the txhash when the origin event was emitted.
OriginTxHash string `gorm:"column:origin_txhash"`
// DestinationTxHash is the txhash when the destination event was emitted.
Expand Down Expand Up @@ -72,7 +72,7 @@ type OriginSent struct {
// MessageID is the keccaked message.
MessageID string `gorm:"column:message_id"`
// MessageHash is the message hash.
MessageHash string `gorm:"column:message_hash;primaryKey"`
MessageHash string `gorm:"type:varchar(64);column:message_hash;primaryKey"`
// ChainID is the chain id.
ChainID uint32 `gorm:"column:chain_id;primaryKey;index:idx_tx_hash_origin,priority:2,sort:desc"`
// Destination is the destination chain id.
Expand Down Expand Up @@ -114,7 +114,7 @@ type Executed struct {
// TxIndex is the index of the tx in a block.
TxIndex uint `gorm:"column:tx_index"`
// MessageHash is the message hash.
MessageHash string `gorm:"column:message_hash;primaryKey"`
MessageHash string `gorm:"type:varchar(64);column:message_hash;primaryKey"`
// ChainID is the chain id.
ChainID uint32 `gorm:"column:chain_id;primaryKey;index:idx_tx_hash_executed,priority:2,sort:desc"`
// RemoteDomain is the destination.
Expand Down

0 comments on commit a3972c8

Please sign in to comment.