migration0

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(tx *gorm.DB) error

Types

type Head struct {
	HashRaw string `gorm:"primary_key;type:varchar;column:hash"`
	Number  int64  `gorm:"index;type:bigint;not null"`
}

Head is a capture of the model representing Head before migration1560881846

type RunRequest added in v0.6.4

type RunRequest struct {
	ID        uint `gorm:"primary_key"`
	RequestID *string
	TxHash    *common.Hash
	Requester *common.Address
	CreatedAt time.Time
}

RunRequest stores the fields used to initiate the parent job run.

type TaskRun

type TaskRun struct {
	ID                   string    `json:"id" gorm:"primary_key;not null"`
	JobRunID             string    `json:"-" gorm:"index;not null;type:varchar(36) REFERENCES job_runs(id) ON DELETE CASCADE"`
	ResultID             uint      `json:"-"`
	Status               string    `json:"status"`
	TaskSpecID           uint      `json:"-" gorm:"index;not null REFERENCES task_specs(id)"`
	MinimumConfirmations uint64    `json:"minimumConfirmations"`
	CreatedAt            time.Time `json:"-" gorm:"index"`
}

TaskRun stores the Task and represents the status of the Task to be ran.

type Tx

type Tx struct {
	ID        uint64         `gorm:"primary_key;auto_increment"`
	From      common.Address `gorm:"index;not null"`
	To        common.Address `gorm:"not null"`
	Data      []byte
	Nonce     uint64      `gorm:"index"`
	Value     *models.Big `gorm:"type:varchar(255)"`
	GasLimit  uint64
	Hash      common.Hash
	GasPrice  *models.Big `gorm:"type:varchar(255)"`
	Confirmed bool
	Hex       string `gorm:"type:text"`
	SentAt    uint64
}

Tx is a capture of the model representing Txes before migration1559081901

type TxAttempt

type TxAttempt struct {
	Hash      common.Hash `gorm:"primary_key;not null"`
	TxID      uint64      `gorm:"index"`
	GasPrice  *models.Big `gorm:"type:varchar(255)"`
	Confirmed bool
	Hex       string `gorm:"type:text"`
	SentAt    uint64
	CreatedAt time.Time `gorm:"index"`
}

TxAttempt is a capture of the model representing TxAttempts before migration1559081901

Jump to

Keyboard shortcuts

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