Skip to content

Commit

Permalink
Merge pull request #168 from filecoin-project/feat/lt/miner_blocks_mi…
Browse files Browse the repository at this point in the history
…grate

feat: mysql table migrate for miner_blocks
  • Loading branch information
simlecode authored Feb 21, 2023
2 parents beda3b4 + 61d38cf commit d7f545d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions node/modules/slashfilter/slashfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ type mysqlSlashFilter struct {
}

type MinedBlock struct {
ParentEpoch int64 `gorm:"column:parent_epoch;type:bigint(20);NOT NULL"`
ParentKey string `gorm:"column:parent_key;type:varchar(2048);NOT NULL"`
ParentEpoch int64 `gorm:"column:parent_epoch;type:bigint(20);default:0;NOT NULL"`
ParentKey string `gorm:"column:parent_key;type:varchar(2048);default:'';NOT NULL"`

Epoch int64 `gorm:"column:epoch;type:bigint(20);NOT NULL;primary_key"`
Miner string `gorm:"column:miner;type:varchar(256);NOT NULL;primary_key"`
Cid string `gorm:"column:cid;type:varchar(256);default:''"`

WinningAt time.Time `gorm:"column:winning_at;type:datetime;NOT NULL"`
WinningAt time.Time `gorm:"column:winning_at;type:datetime"`
MineState StateMining `gorm:"column:mine_state;type:tinyint(4);default:0;comment:0-mining,1-success,2-timeout,3-chain forked,4-error;NOT NULL"`
Consuming int64 `gorm:"column:consuming;type:bigint(10);NOT NULL"` // reserved
Consuming int64 `gorm:"column:consuming;type:bigint(10);default:0;NOT NULL"` // reserved
}

func (m *MinedBlock) TableName() string {
Expand Down

0 comments on commit d7f545d

Please sign in to comment.