diff options
| author | Nikolaus Gotsche <n@softwarefools.com> | 2018-11-11 18:40:57 +0100 |
|---|---|---|
| committer | Nikolaus Gotsche <n@softwarefools.com> | 2018-11-11 18:40:57 +0100 |
| commit | 70eb8ab6fe7ff82482cc44d346104be5c9edba8b (patch) | |
| tree | b673b446173927077cb19edc9a8dc76000ea59b3 /sqlite.go | |
| parent | e3b6e0b00dbce15bf19a6f7d1bf39ea033651a0b (diff) | |
Import Export with clean commands0.3.6
Diffstat (limited to 'sqlite.go')
| -rw-r--r-- | sqlite.go | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -495,21 +495,26 @@ func SaveImportsToDB(cus []Customer, prs []Project, tsk []Task) { fmt.Println(nli," Tasks:",len(tsk)) fmt.Println(sub("")) if isInterSure(nli+" Are You sure to Import them all?") { + i := 0 for _,c := range cus { id := SaveCustomer(c) cusids=append(cusids,IdMap{c.Id,id}) + i++ } - fmt.Println(cusids) + //fmt.Println(cusids) prs = ChangeCustomerIds(cusids,prs) for _,p := range prs { id := SaveProject(p) prids=append(prids,IdMap{p.Id,id}) + i++ } - fmt.Println(prids) + //fmt.Println(prids) tsk = ChangeProjectIds(prids,tsk) for _,t := range tsk { SaveTask(t) + i++ } + fmt.Println(nli,i,"items imported") fmt.Println(frame(posR(),false)) }else{ fmt.Println(frame(negR(),false)) |
