mirror of
https://github.com/documize/community.git
synced 2025-07-19 21:29:42 +02:00
Ensure Backup/Restore process section attachments
New DB column c_sectionid means something new to backup and restore.
This commit is contained in:
parent
4de83beba4
commit
8e4ad6422b
4 changed files with 1139 additions and 1139 deletions
|
@ -766,7 +766,7 @@ func (b backerHandler) dmzDocument(files *[]backupItem) (err error) {
|
|||
at := []attachment.Attachment{}
|
||||
err = b.Runtime.Db.Select(&at, `
|
||||
SELECT id, c_refid AS refid,
|
||||
c_orgid AS orgid, c_docid AS documentid, c_job AS job, c_fileid AS fileid,
|
||||
c_orgid AS orgid, c_docid AS documentid, c_sectionid AS sectionid, c_job AS job, c_fileid AS fileid,
|
||||
c_filename AS filename, c_data AS data, c_extension AS extension,
|
||||
c_created AS created, c_revised AS revised
|
||||
FROM dmz_doc_attachment`+w)
|
||||
|
|
|
@ -1521,11 +1521,11 @@ func (r *restoreHandler) dmzDocAttachment() (err error) {
|
|||
for i := range at {
|
||||
_, err = r.Context.Transaction.Exec(r.Runtime.Db.Rebind(`
|
||||
INSERT INTO dmz_doc_attachment
|
||||
(c_refid, c_orgid, c_docid, c_job, c_fileid,
|
||||
(c_refid, c_orgid, c_docid, c_sectionid, c_job, c_fileid,
|
||||
c_filename, c_data, c_extension, c_created, c_revised)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`),
|
||||
at[i].RefID, r.remapOrg(at[i].OrgID), at[i].DocumentID, at[i].Job,
|
||||
at[i].FileID, at[i].Filename,
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`),
|
||||
at[i].RefID, r.remapOrg(at[i].OrgID), at[i].DocumentID, at[i].SectionID,
|
||||
at[i].Job, at[i].FileID, at[i].Filename,
|
||||
at[i].Data, at[i].Extension, at[i].Created, at[i].Revised)
|
||||
|
||||
if err != nil {
|
||||
|
|
|
@ -42,7 +42,7 @@ func main() {
|
|||
rt.Product.Major = "2"
|
||||
rt.Product.Minor = "4"
|
||||
rt.Product.Patch = "0"
|
||||
rt.Product.Revision = "190419131243"
|
||||
rt.Product.Revision = "190420150416"
|
||||
rt.Product.Version = fmt.Sprintf("%s.%s.%s", rt.Product.Major, rt.Product.Minor, rt.Product.Patch)
|
||||
rt.Product.Edition = domain.CommunityEdition
|
||||
rt.Product.Title = fmt.Sprintf("%s Edition", rt.Product.Edition)
|
||||
|
|
2264
embed/bindata.go
2264
embed/bindata.go
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue