2014-02-15 20:47:30 +00:00
|
|
|
package migrate
|
|
|
|
|
|
|
|
type Rev1 struct{}
|
|
|
|
|
|
|
|
var RenamePrivelegedToPrivileged = &Rev1{}
|
|
|
|
|
|
|
|
func (r *Rev1) Revision() int64 {
|
|
|
|
return 201402200603
|
|
|
|
}
|
|
|
|
|
2014-03-08 05:19:28 +00:00
|
|
|
func (r *Rev1) Up(mg *MigrationDriver) error {
|
|
|
|
_, err := mg.RenameColumns("repos", map[string]string{
|
2014-02-15 20:47:30 +00:00
|
|
|
"priveleged": "privileged",
|
|
|
|
})
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2014-03-08 05:19:28 +00:00
|
|
|
func (r *Rev1) Down(mg *MigrationDriver) error {
|
|
|
|
_, err := mg.RenameColumns("repos", map[string]string{
|
2014-02-15 20:47:30 +00:00
|
|
|
"privileged": "priveleged",
|
|
|
|
})
|
|
|
|
return err
|
|
|
|
}
|