harness-drone/pkg/database/migrate/201402200603_rename_privelege_to_privilege.go

24 lines
444 B
Go
Raw Normal View History

package migrate
type Rev1 struct{}
var RenamePrivelegedToPrivileged = &Rev1{}
func (r *Rev1) Revision() int64 {
return 201402200603
}
func (r *Rev1) Up(mg *MigrationDriver) error {
_, err := mg.RenameColumns("repos", map[string]string{
"priveleged": "privileged",
})
return err
}
func (r *Rev1) Down(mg *MigrationDriver) error {
_, err := mg.RenameColumns("repos", map[string]string{
"privileged": "priveleged",
})
return err
}