gitea: code.gitea.io/gitea/models/migrations Index | Files

package migrations

import "code.gitea.io/gitea/models/migrations"

Index

Package Files

migrations.go v13.go v14.go v15.go v16.go v17.go v18.go v19.go v20.go v21.go v22.go v23.go v24.go v25.go v26.go v27.go v28.go v29.go v30.go v31.go v32.go v33.go v34.go v35.go v36.go v37.go v38.go v39.go v40.go v41.go v45.go v46.go v47.go v48.go v49.go v50.go v51.go v52.go v53.go v54.go v55.go v56.go v57.go v58.go v59.go v60.go v61.go v62.go v63.go v64.go v65.go v66.go v67.go v68.go v69.go v70.go v71.go v72.go v73.go v74.go v75.go v76.go v77.go v78.go v79.go v80.go v81.go v82.go v83.go v84.go v85.go v86.go v87.go v88.go v89.go

Constants

const (
    V16UnitTypeCode            = iota + 1 // 1 code
    V16UnitTypeIssues                     // 2 issues
    V16UnitTypePRs                        // 3 PRs
    V16UnitTypeCommits                    // 4 Commits
    V16UnitTypeReleases                   // 5 Releases
    V16UnitTypeWiki                       // 6 Wiki
    V16UnitTypeSettings                   // 7 Settings
    V16UnitTypeExternalWiki               // 8 ExternalWiki
    V16UnitTypeExternalTracker            // 9 ExternalTracker
)

Enumerate all the unit types

func Migrate Uses

func Migrate(x *xorm.Engine) error

Migrate database to current version

type CommitStatus Uses

type CommitStatus struct {
    ID          int64  `xorm:"pk autoincr"`
    Index       int64  `xorm:"INDEX UNIQUE(repo_sha_index)"`
    RepoID      int64  `xorm:"INDEX UNIQUE(repo_sha_index)"`
    State       string `xorm:"VARCHAR(7) NOT NULL"`
    SHA         string `xorm:"VARCHAR(64) NOT NULL INDEX UNIQUE(repo_sha_index)"`
    TargetURL   string `xorm:"TEXT"`
    Description string `xorm:"TEXT"`
    Context     string `xorm:"TEXT"`
    CreatorID   int64  `xorm:"INDEX"`

    CreatedUnix int64 `xorm:"INDEX"`
    UpdatedUnix int64 `xorm:"INDEX"`
}

CommitStatus see models/status.go

type ExternalLoginUser Uses

type ExternalLoginUser struct {
    ExternalID    string `xorm:"NOT NULL"`
    UserID        int64  `xorm:"NOT NULL"`
    LoginSourceID int64  `xorm:"NOT NULL"`
}

ExternalLoginUser makes the connecting between some existing user and additional external login sources

type Migration Uses

type Migration interface {
    Description() string
    Migrate(*xorm.Engine) error
}

Migration describes on migration from lower version to high version

func NewMigration Uses

func NewMigration(desc string, fn func(*xorm.Engine) error) Migration

NewMigration creates a new migration

type ReleaseV39 Uses

type ReleaseV39 struct {
    IsTag bool `xorm:"NOT NULL DEFAULT false"`
}

ReleaseV39 describes the added field for Release

func (*ReleaseV39) TableName Uses

func (*ReleaseV39) TableName() string

TableName will be invoked by XORM to customrize the table name

type TAccessToken Uses

type TAccessToken struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
    UpdatedUnix int64
}

TAccessToken defines the struct for migrating table access_token

func (*TAccessToken) TableName Uses

func (t *TAccessToken) TableName() string

TableName will be invoked by XORM to customrize the table name

type TAction Uses

type TAction struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
}

TAction defines the struct for migrating table action

func (*TAction) TableName Uses

func (t *TAction) TableName() string

TableName will be invoked by XORM to customrize the table name

type TAttachment Uses

type TAttachment struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
}

TAttachment defines the struct for migrating table attachment

func (*TAttachment) TableName Uses

func (t *TAttachment) TableName() string

TableName will be invoked by XORM to customrize the table name

type TComment Uses

type TComment struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
}

TComment defines the struct for migrating table comment

func (*TComment) TableName Uses

func (t *TComment) TableName() string

TableName will be invoked by XORM to customrize the table name

type TDeployKey Uses

type TDeployKey struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
    UpdatedUnix int64
}

TDeployKey defines the struct for migrating table deploy_key

func (*TDeployKey) TableName Uses

func (t *TDeployKey) TableName() string

TableName will be invoked by XORM to customrize the table name

type TIssue Uses

type TIssue struct {
    ID           int64 `xorm:"pk autoincr"`
    DeadlineUnix int64
    CreatedUnix  int64
    UpdatedUnix  int64
}

TIssue defines the struct for migrating table issue

func (*TIssue) TableName Uses

func (t *TIssue) TableName() string

TableName will be invoked by XORM to customrize the table name

type TLoginSource Uses

type TLoginSource struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
    UpdatedUnix int64
}

TLoginSource defines the struct for migrating table login_source

func (*TLoginSource) TableName Uses

func (t *TLoginSource) TableName() string

TableName will be invoked by XORM to customrize the table name

type TMilestone Uses

type TMilestone struct {
    ID             int64 `xorm:"pk autoincr"`
    DeadlineUnix   int64
    ClosedDateUnix int64
}

TMilestone defines the struct for migrating table milestone

func (*TMilestone) TableName Uses

func (t *TMilestone) TableName() string

TableName will be invoked by XORM to customrize the table name

type TMirror Uses

type TMirror struct {
    ID             int64 `xorm:"pk autoincr"`
    UpdatedUnix    int64
    NextUpdateUnix int64
}

TMirror defines the struct for migrating table mirror

func (*TMirror) TableName Uses

func (t *TMirror) TableName() string

TableName will be invoked by XORM to customrize the table name

type TNotice Uses

type TNotice struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
}

TNotice defines the struct for migrating table notice

func (*TNotice) TableName Uses

func (t *TNotice) TableName() string

TableName will be invoked by XORM to customrize the table name

type TPublicKey Uses

type TPublicKey struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
    UpdatedUnix int64
}

TPublicKey defines the struct for migrating table public_key

func (*TPublicKey) TableName Uses

func (t *TPublicKey) TableName() string

TableName will be invoked by XORM to customrize the table name

type TPull Uses

type TPull struct {
    ID         int64 `xorm:"pk autoincr"`
    MergedUnix int64
}

TPull defines the struct for migrating table pull_request

func (*TPull) TableName Uses

func (t *TPull) TableName() string

TableName will be invoked by XORM to customrize the table name

type TRelease Uses

type TRelease struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
}

TRelease defines the struct for migrating table release

func (*TRelease) TableName Uses

func (t *TRelease) TableName() string

TableName will be invoked by XORM to customrize the table name

type TRepo Uses

type TRepo struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
    UpdatedUnix int64
}

TRepo defines the struct for migrating table repository

func (*TRepo) TableName Uses

func (t *TRepo) TableName() string

TableName will be invoked by XORM to customrize the table name

type TUser Uses

type TUser struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
    UpdatedUnix int64
}

TUser defines the struct for migrating table user

func (*TUser) TableName Uses

func (t *TUser) TableName() string

TableName will be invoked by XORM to customrize the table name

type TWebhook Uses

type TWebhook struct {
    ID          int64 `xorm:"pk autoincr"`
    CreatedUnix int64
    UpdatedUnix int64
}

TWebhook defines the struct for migrating table webhook

func (*TWebhook) TableName Uses

func (t *TWebhook) TableName() string

TableName will be invoked by XORM to customrize the table name

type Team Uses

type Team struct {
    UnitTypes []int `xorm:"json"`
}

Team see models/team.go

type UserOpenID Uses

type UserOpenID struct {
    ID  int64  `xorm:"pk autoincr"`
    UID int64  `xorm:"INDEX NOT NULL"`
    URI string `xorm:"UNIQUE NOT NULL"`
}

UserOpenID is the list of all OpenID identities of a user.

type UserV14 Uses

type UserV14 struct {
    DiffViewStyle string `xorm:"NOT NULL DEFAULT ''"`
}

UserV14 describes the added fields for migrating from v13 -> v14

func (*UserV14) TableName Uses

func (*UserV14) TableName() string

TableName will be invoked by XORM to customize the table name

type Version Uses

type Version struct {
    ID      int64 `xorm:"pk autoincr"`
    Version int64
}

Version describes the version table. Should have only one row with id==1

Package migrations imports 32 packages (graph) and is imported by 10 packages. Updated 2019-07-21. Refresh now. Tools for package owners.