This commit is contained in:
parent
2495986872
commit
a91b881d58
|
@ -21,6 +21,15 @@ import (
|
||||||
"src.techknowlogick.com/xormigrate"
|
"src.techknowlogick.com/xormigrate"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Used for rollback
|
||||||
|
type tasksReminderDate struct {
|
||||||
|
ReminderUnix int64 `xorm:"int(11) INDEX"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (tasksReminderDate) TableName() string {
|
||||||
|
return "tasks"
|
||||||
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
migrations = append(migrations, &xormigrate.Migration{
|
migrations = append(migrations, &xormigrate.Migration{
|
||||||
ID: "20190324205606",
|
ID: "20190324205606",
|
||||||
|
@ -29,8 +38,7 @@ func init() {
|
||||||
return dropTableColum(tx, "tasks", "reminder_unix")
|
return dropTableColum(tx, "tasks", "reminder_unix")
|
||||||
},
|
},
|
||||||
Rollback: func(tx *xorm.Engine) error {
|
Rollback: func(tx *xorm.Engine) error {
|
||||||
|
return tx.Sync2(tasksReminderDate{})
|
||||||
return nil
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user