alter table guestcdrom_tbl modify column size bigint (#7593)

This commit is contained in:
wanyaoqi
2020-08-20 13:09:58 +08:00
committed by GitHub
parent 8942d19717
commit dcf8183c30
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -898,7 +898,7 @@ func (self *SGuest) insertIso(imageId string) bool {
return cdrom.insertIso(imageId)
}
func (self *SGuest) InsertIsoSucc(imageId string, path string, size int, name string) bool {
func (self *SGuest) InsertIsoSucc(imageId string, path string, size int64, name string) bool {
cdrom := self.getCdrom(false)
return cdrom.insertIsoSucc(imageId, path, size, name)
}
+2 -2
View File
@@ -51,7 +51,7 @@ type SGuestcdrom struct {
ImageId string `width:"36" charset:"ascii" nullable:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=True)
Name string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=True)
Path string `width:"256" charset:"ascii" nullable:"true"` // Column(VARCHAR(256, charset='ascii'), nullable=True)
Size int `nullable:"false" default:"0"` // = Column(Integer, nullable=False, default=0)
Size int64 `nullable:"false" default:"0"` // = Column(Integer, nullable=False, default=0)
UpdatedAt time.Time `nullable:"false" updated_at:"true" nullable:"false"`
UpdateVersion int `default:"0" nullable:"false" auto_version:"true"`
}
@@ -75,7 +75,7 @@ func (self *SGuestcdrom) insertIso(imageId string) bool {
}
}
func (self *SGuestcdrom) insertIsoSucc(imageId string, path string, size int, name string) bool {
func (self *SGuestcdrom) insertIsoSucc(imageId string, path string, size int64, name string) bool {
if self.ImageId == imageId {
_, err := db.Update(self, func() error {
self.Name = name