Change file size from int to int64
Signed-off-by: Yannis Varni <yannis@edinomis.fr>
This commit is contained in:
@@ -32,7 +32,7 @@ type (
|
|||||||
MimeType string `db:"mime_type"`
|
MimeType string `db:"mime_type"`
|
||||||
FileName string `db:"file_name"`
|
FileName string `db:"file_name"`
|
||||||
FileKey string `db:"file_key"`
|
FileKey string `db:"file_key"`
|
||||||
FileSize int `db:"file_size"`
|
FileSize int64 `db:"file_size"`
|
||||||
CreatedAt time.Time `db:"created_at"`
|
CreatedAt time.Time `db:"created_at"`
|
||||||
UpdatedAt time.Time `db:"updated_at"`
|
UpdatedAt time.Time `db:"updated_at"`
|
||||||
DeletedAt *time.Time `db:"deleted_at"`
|
DeletedAt *time.Time `db:"deleted_at"`
|
||||||
|
|||||||
5
pkg/coredata/migrations/20250925T184234Z.sql
Normal file
5
pkg/coredata/migrations/20250925T184234Z.sql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
ALTER TABLE files
|
||||||
|
ALTER COLUMN file_size TYPE bigint;
|
||||||
|
|
||||||
|
ALTER TABLE vendor_compliance_reports
|
||||||
|
ALTER COLUMN file_size TYPE bigint;
|
||||||
@@ -34,7 +34,7 @@ type (
|
|||||||
ValidUntil *time.Time
|
ValidUntil *time.Time
|
||||||
ReportName string
|
ReportName string
|
||||||
FileKey string
|
FileKey string
|
||||||
FileSize int
|
FileSize int64
|
||||||
SnapshotID *gid.GID
|
SnapshotID *gid.GID
|
||||||
SourceID *gid.GID
|
SourceID *gid.GID
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
|
|||||||
@@ -1251,7 +1251,7 @@ func (s *DocumentService) BuildAndUploadExport(ctx context.Context, exportJobID
|
|||||||
MimeType: "application/zip",
|
MimeType: "application/zip",
|
||||||
FileName: fmt.Sprintf("Documents Export %s.zip", now.Format("2006-01-02")),
|
FileName: fmt.Sprintf("Documents Export %s.zip", now.Format("2006-01-02")),
|
||||||
FileKey: uuid.String(),
|
FileKey: uuid.String(),
|
||||||
FileSize: int(fileInfo.Size()),
|
FileSize: fileInfo.Size(),
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -823,7 +823,7 @@ func (s *FrameworkService) BuildAndUploadExport(ctx context.Context, exportJobID
|
|||||||
MimeType: "application/zip",
|
MimeType: "application/zip",
|
||||||
FileName: fmt.Sprintf("Framework Export %s.zip", now.Format("2006-01-02")),
|
FileName: fmt.Sprintf("Framework Export %s.zip", now.Format("2006-01-02")),
|
||||||
FileKey: uuid.String(),
|
FileKey: uuid.String(),
|
||||||
FileSize: int(fileInfo.Size()),
|
FileSize: fileInfo.Size(),
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ func (s TrustCenterReferenceService) uploadLogoFile(
|
|||||||
MimeType: contentType,
|
MimeType: contentType,
|
||||||
FileName: filename,
|
FileName: filename,
|
||||||
FileKey: objectKey.String(),
|
FileKey: objectKey.String(),
|
||||||
FileSize: int(fileSize),
|
FileSize: fileSize,
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ func (s TrustCenterService) UploadNDA(
|
|||||||
MimeType: mimeType,
|
MimeType: mimeType,
|
||||||
FileName: req.FileName,
|
FileName: req.FileName,
|
||||||
FileKey: objectKey.String(),
|
FileKey: objectKey.String(),
|
||||||
FileSize: int(*headOutput.ContentLength),
|
FileSize: *headOutput.ContentLength,
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ func (s VendorBusinessAssociateAgreementService) Upload(
|
|||||||
MimeType: mimeType,
|
MimeType: mimeType,
|
||||||
FileName: req.FileName,
|
FileName: req.FileName,
|
||||||
FileKey: objectKey.String(),
|
FileKey: objectKey.String(),
|
||||||
FileSize: int(*headOutput.ContentLength),
|
FileSize: *headOutput.ContentLength,
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ func (s VendorComplianceReportService) Upload(
|
|||||||
ValidUntil: req.ValidUntil,
|
ValidUntil: req.ValidUntil,
|
||||||
ReportName: req.ReportName,
|
ReportName: req.ReportName,
|
||||||
FileKey: objectKey.String(),
|
FileKey: objectKey.String(),
|
||||||
FileSize: int(*headOutput.ContentLength),
|
FileSize: *headOutput.ContentLength,
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ func (s VendorDataPrivacyAgreementService) Upload(
|
|||||||
MimeType: mimeType,
|
MimeType: mimeType,
|
||||||
FileName: req.FileName,
|
FileName: req.FileName,
|
||||||
FileKey: objectKey.String(),
|
FileKey: objectKey.String(),
|
||||||
FileSize: int(*headOutput.ContentLength),
|
FileSize: *headOutput.ContentLength,
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2046,7 +2046,7 @@ type VendorBusinessAssociateAgreement struct {
|
|||||||
ValidUntil *time.Time `json:"validUntil,omitempty"`
|
ValidUntil *time.Time `json:"validUntil,omitempty"`
|
||||||
FileName string `json:"fileName"`
|
FileName string `json:"fileName"`
|
||||||
FileURL string `json:"fileUrl"`
|
FileURL string `json:"fileUrl"`
|
||||||
FileSize int `json:"fileSize"`
|
FileSize int64 `json:"fileSize"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
}
|
}
|
||||||
@@ -2061,7 +2061,7 @@ type VendorComplianceReport struct {
|
|||||||
ValidUntil *time.Time `json:"validUntil,omitempty"`
|
ValidUntil *time.Time `json:"validUntil,omitempty"`
|
||||||
ReportName string `json:"reportName"`
|
ReportName string `json:"reportName"`
|
||||||
FileURL string `json:"fileUrl"`
|
FileURL string `json:"fileUrl"`
|
||||||
FileSize int `json:"fileSize"`
|
FileSize int64 `json:"fileSize"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
}
|
}
|
||||||
@@ -2110,7 +2110,7 @@ type VendorDataPrivacyAgreement struct {
|
|||||||
ValidUntil *time.Time `json:"validUntil,omitempty"`
|
ValidUntil *time.Time `json:"validUntil,omitempty"`
|
||||||
FileName string `json:"fileName"`
|
FileName string `json:"fileName"`
|
||||||
FileURL string `json:"fileUrl"`
|
FileURL string `json:"fileUrl"`
|
||||||
FileSize int `json:"fileSize"`
|
FileSize int64 `json:"fileSize"`
|
||||||
CreatedAt time.Time `json:"createdAt"`
|
CreatedAt time.Time `json:"createdAt"`
|
||||||
UpdatedAt time.Time `json:"updatedAt"`
|
UpdatedAt time.Time `json:"updatedAt"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user