mirror of
https://github.com/documize/community.git
synced 2025-07-18 20:59:43 +02:00
Include new comment fields in backup/restore process
c_sectionid c_replyto
This commit is contained in:
parent
216866a953
commit
64612b825a
5 changed files with 1101 additions and 1107 deletions
|
@ -733,7 +733,8 @@ func (b backerHandler) dmzDocument(files *[]backupItem) (err error) {
|
|||
err = b.Runtime.Db.Select(&cm, `
|
||||
SELECT c_refid AS refid, c_orgid AS orgid, c_docid AS documentid,
|
||||
c_userid AS userid, c_email AS email,
|
||||
c_feedback AS feedback, c_created AS created
|
||||
c_feedback AS feedback, c_sectionid AS sectionid, c_replyto AS replyto,
|
||||
c_created AS created
|
||||
FROM dmz_doc_comment`+w)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "select.doccomment")
|
||||
|
|
|
@ -59,6 +59,8 @@ type comment struct {
|
|||
UserID string `json:"userId"`
|
||||
Email string `json:"email"`
|
||||
Feedback string `json:"feedback"`
|
||||
SectionID string `json:"sectionId"`
|
||||
ReplyTo string `json:"replyTo"`
|
||||
Created time.Time `json:"created"`
|
||||
}
|
||||
|
||||
|
|
|
@ -1551,15 +1551,6 @@ func (r *restoreHandler) dmzDocAttachment() (err error) {
|
|||
func (r *restoreHandler) dmzDocComment() (err error) {
|
||||
filename := "dmz_doc_comment.json"
|
||||
|
||||
type comment struct {
|
||||
RefID string `json:"feedbackId"`
|
||||
OrgID string `json:"orgId"`
|
||||
DocumentID string `json:"documentId"`
|
||||
UserID string `json:"userId"`
|
||||
Email string `json:"email"`
|
||||
Feedback string `json:"feedback"`
|
||||
Created time.Time `json:"created"`
|
||||
}
|
||||
cm := []comment{}
|
||||
err = r.fileJSON(filename, &cm)
|
||||
if err != nil {
|
||||
|
@ -1590,10 +1581,10 @@ func (r *restoreHandler) dmzDocComment() (err error) {
|
|||
for i := range cm {
|
||||
_, err = r.Context.Transaction.Exec(r.Runtime.Db.Rebind(`
|
||||
INSERT INTO dmz_doc_comment
|
||||
(c_refid, c_orgid, c_userid, c_docid, c_email, c_feedback, c_created)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)`),
|
||||
(c_refid, c_orgid, c_userid, c_docid, c_email, c_feedback, c_replyto, c_sectionid, c_created)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`),
|
||||
cm[i].RefID, r.remapOrg(cm[i].OrgID), r.remapUser(cm[i].UserID), cm[i].DocumentID,
|
||||
cm[i].Email, cm[i].Feedback, cm[i].Created)
|
||||
cm[i].Email, cm[i].Feedback, cm[i].ReplyTo, cm[i].SectionID, cm[i].Created)
|
||||
|
||||
if err != nil {
|
||||
r.Context.Transaction.Rollback()
|
||||
|
@ -1727,6 +1718,7 @@ func (r *restoreHandler) dmzUser() (err error) {
|
|||
insert = true
|
||||
}
|
||||
if err != nil {
|
||||
r.Context.Transaction.Rollback()
|
||||
err = errors.Wrap(err, fmt.Sprintf("unable to check email %s", u[i].Email))
|
||||
return
|
||||
}
|
||||
|
|
2184
embed/bindata.go
2184
embed/bindata.go
File diff suppressed because one or more lines are too long
|
@ -159,7 +159,6 @@
|
|||
font-weight: 500;
|
||||
background-color: map-get($gray-shades, 800);
|
||||
color: map-get($gray-shades, 100);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
> .version-dropdown {
|
||||
|
@ -184,7 +183,7 @@
|
|||
}
|
||||
|
||||
> .dates {
|
||||
margin-bottom: 3rem;
|
||||
margin-bottom: 2rem;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 300;
|
||||
color: map-get($gray-shades, 700);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue