// Copyright 2016 The Gogs Authors. All rights reserved.// Use of this source code is governed by a MIT-style// license that can be found in the LICENSE file.packagemigrationsimport("fmt""github.com/go-xorm/xorm")funcsetCommentUpdatedWithCreated(x*xorm.Engine)(errerror){typeCommentstruct{UpdatedUnixint64}iferr=x.Sync2(new(Comment));err!=nil{returnfmt.Errorf("Sync2: %v",err)}elseif_,err=x.Exec("UPDATE comment SET updated_unix = created_unix");err!=nil{returnfmt.Errorf("set update_unix: %v",err)}returnnil}