2014-05-23 03:16:01 +00:00
|
|
|
package migrate
|
|
|
|
|
|
|
|
type rev20140522205400 struct{}
|
|
|
|
|
|
|
|
var SaveDroneYml = &rev20140522205400{}
|
|
|
|
|
|
|
|
func (r *rev20140522205400) Revision() int64 {
|
|
|
|
return 20140522205400
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *rev20140522205400) Up(mg *MigrationDriver) error {
|
|
|
|
_, err := mg.AddColumn("builds", "buildscript TEXT")
|
2014-05-29 16:47:21 +00:00
|
|
|
_, err = mg.Tx.Exec("UPDATE builds SET buildscript = '' WHERE buildscript IS NULL")
|
2014-05-23 03:16:01 +00:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *rev20140522205400) Down(mg *MigrationDriver) error {
|
|
|
|
_, err := mg.DropColumns("builds", "buildscript")
|
|
|
|
return err
|
|
|
|
}
|