code.gitea.io/gitea@v1.21.7/models/migrations/v1_14/v173.go (about)

     1  // Copyright 2021 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package v1_14 //nolint
     5  
     6  import (
     7  	"fmt"
     8  
     9  	"xorm.io/xorm"
    10  )
    11  
    12  func AddTimeIDCommentColumn(x *xorm.Engine) error {
    13  	type Comment struct {
    14  		TimeID int64
    15  	}
    16  
    17  	if err := x.Sync(new(Comment)); err != nil {
    18  		return fmt.Errorf("Sync: %w", err)
    19  	}
    20  	return nil
    21  }