rename IsAllRepositories to IncludesAllRepositories

This commit is contained in:
Nicolas Gourdon
2019-04-30 20:43:38 +02:00
parent a02aa18985
commit 8216a2a210
16 changed files with 111 additions and 111 deletions
+1 -1
View File
@@ -224,7 +224,7 @@ var migrations = []Migration{
// v84 -> v85
NewMigration("add table to store original imported gpg keys", addGPGKeyImport),
// v85 -> v86
NewMigration("add is_all_repositories to teams", addTeamIsAllRepositories),
NewMigration("add includes_all_repositories to teams", addTeamIncludesAllRepositories),
}
// Migrate database to current version
+4 -4
View File
@@ -8,18 +8,18 @@ import (
"github.com/go-xorm/xorm"
)
func addTeamIsAllRepositories(x *xorm.Engine) error {
func addTeamIncludesAllRepositories(x *xorm.Engine) error {
type Team struct {
ID int64 `xorm:"pk autoincr"`
IsAllRepositories bool `xorm:"NOT NULL DEFAULT false"`
ID int64 `xorm:"pk autoincr"`
IncludesAllRepositories bool `xorm:"NOT NULL DEFAULT false"`
}
if err := x.Sync2(new(Team)); err != nil {
return err
}
_, err := x.Exec("UPDATE `team` SET `is_all_repositories` = ? WHERE `name`=?",
_, err := x.Exec("UPDATE `team` SET `includes_all_repositories` = ? WHERE `name`=?",
true, "Owners")
return err
}