xorm go 库有 2 个看起来相似的函数:
// Sync the new struct changes to database, this method will automatically add
// table, column, index, unique. but will not delete or change anything.
// If you change some field, you should change the database manually.
func (engine *Engine) Sync(beans ...interface{}) error
// Sync2 synchronize structs to database tables
func (engine *Engine) Sync2(beans ...interface{}) error
(虽然 Sync2() “文档”不包含它将添加列/索引等的解释,但实现似乎也这样做了)
这两个函数有什么区别,什么时候应该使用 Sync 什么时候应该使用 Sync2 ?