mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-10 17:45:36 +00:00
Fix migration number (#1134)
This commit is contained in:
parent
f15b27aadf
commit
ae771a9931
1 changed files with 3 additions and 3 deletions
|
@ -18,21 +18,21 @@ import (
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SecretV006 struct {
|
type SecretV007 struct {
|
||||||
Owner string `json:"-" xorm:"NOT NULL DEFAULT '' UNIQUE(s) INDEX 'secret_owner'"`
|
Owner string `json:"-" xorm:"NOT NULL DEFAULT '' UNIQUE(s) INDEX 'secret_owner'"`
|
||||||
RepoID int64 `json:"-" xorm:"NOT NULL DEFAULT 0 UNIQUE(s) INDEX 'secret_repo_id'"`
|
RepoID int64 `json:"-" xorm:"NOT NULL DEFAULT 0 UNIQUE(s) INDEX 'secret_repo_id'"`
|
||||||
Name string `json:"name" xorm:"NOT NULL UNIQUE(s) INDEX 'secret_name'"`
|
Name string `json:"name" xorm:"NOT NULL UNIQUE(s) INDEX 'secret_name'"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TableName return database table name for xorm
|
// TableName return database table name for xorm
|
||||||
func (SecretV006) TableName() string {
|
func (SecretV007) TableName() string {
|
||||||
return "secrets"
|
return "secrets"
|
||||||
}
|
}
|
||||||
|
|
||||||
var alterTableSecretsAddUserCol = task{
|
var alterTableSecretsAddUserCol = task{
|
||||||
name: "alter-table-add-secrets-user-id",
|
name: "alter-table-add-secrets-user-id",
|
||||||
fn: func(sess *xorm.Session) error {
|
fn: func(sess *xorm.Session) error {
|
||||||
if err := sess.Sync2(new(SecretV006)); err != nil {
|
if err := sess.Sync2(new(SecretV007)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := alterColumnDefault(sess, "secrets", "secret_repo_id", "0"); err != nil {
|
if err := alterColumnDefault(sess, "secrets", "secret_repo_id", "0"); err != nil {
|
Loading…
Reference in a new issue