The xorm go library has 2 function that appear similar:
// 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
(While the Sync2() "docs" doesn't contain the explanation that it will add columns/indexes etc, the implementation does seem to do that too)
What is the difference between these two functions, and when should you use Sync and when should you use Sync2 ?