v7

package
v0.0.0-...-fdde37d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddClaimDataLenForDisputeGameTable = gormigrate.Migration{
	ID: "v7",
	Migrate: func(tx *gorm.DB) error {
		type DisputeGame struct {
			ClaimDataLen int64 `json:"claim_data_len" gorm:"type:bigint;notnull;index:dispute_claim_data_len_index;default:1"`
			GetLenStatus bool  `json:"get_len_status" gorm:"type:tinyint(1);notnull;default:0"`
		}
		return tx.Table("dispute_game").AutoMigrate(&DisputeGame{})
	},
	Rollback: func(db *gorm.DB) error {
		err := db.Migrator().DropColumn("dispute_game", "claim_data_len")
		if err != nil {
			return err
		}
		err = db.Migrator().DropColumn("dispute_game", "get_len_status")
		return err
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL