m20211221_1

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

m20211221_1 handles adding the `Errors` field to Job

Index

Constants

View Source
const ID = "20211221_1"

Variables

This section is empty.

Functions

func Migrate

func Migrate(tx *gorm.DB) error

func Rollback

func Rollback(tx *gorm.DB) error

Types

type Job

type Job struct {
	ID                     uuid.UUID      `gorm:"column:id;primary_key;type:uuid;"`
	Type                   string         `gorm:"column:type"`
	State                  State          `gorm:"column:state;default:INIT"`
	Error                  string         `gorm:"column:error"`
	Errors                 pq.StringArray `gorm:"column:errors;type:text[]"`
	Result                 string         `gorm:"column:result"`
	TransactionID          string         `gorm:"column:transaction_id"`
	ExecCount              int            `gorm:"column:exec_count;default:0"`
	CreatedAt              time.Time      `gorm:"column:created_at"`
	UpdatedAt              time.Time      `gorm:"column:updated_at"`
	DeletedAt              gorm.DeletedAt `gorm:"column:deleted_at;index"`
	ShouldSendNotification bool           `gorm:"-"` // Whether or not to notify admin (via webhook for example)
	Attributes             datatypes.JSON `gorm:"attributes"`
}

Job database model

func (Job) TableName

func (Job) TableName() string

type State

type State string

State is a type for Job state.

Jump to

Keyboard shortcuts

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