diff options
author | Markus Grüneis <gimpf@gimpf.org> | 2014-10-19 14:51:10 +0200 |
---|---|---|
committer | Markus Grüneis <gimpf@gimpf.org> | 2014-10-19 14:52:26 +0200 |
commit | d1e7460a9cda28b99c9c2644b6e178066d323c0d (patch) | |
tree | dab3a367d2e561d3d80c46b67cbec49952a3fc7f /src/hub | |
parent | hub: remove obsolete shell scripts (diff) |
hub: fix storing client-specific data
Diffstat (limited to 'src/hub')
-rw-r--r-- | src/hub/src/spreadspace.org/sfive/s5store.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5store.go b/src/hub/src/spreadspace.org/sfive/s5store.go index 6a6990e..89b449f 100644 --- a/src/hub/src/spreadspace.org/sfive/s5store.go +++ b/src/hub/src/spreadspace.org/sfive/s5store.go @@ -129,6 +129,7 @@ func initDb() *gorp.DbMap { checkErr(err, "sql.Open failed") dbmap := &gorp.DbMap{Db: db, Dialect: gorp.SqliteDialect{}} + // dbmap.TraceOn("[gorp]", log.New(os.Stdout, "myapp:", log.Lmicroseconds)) dbmap.AddTableWithName(tagDb{}, TagsTn).SetKeys(true, "Id").ColMap("Name").SetUnique(true) dbmap.AddTableWithName(sourceTagsDb{}, SourceTagsTn).SetKeys(false, "TagId", "SourceId") @@ -286,7 +287,7 @@ func (s sqliteStore) insertDataUpdateEntry(src sourceDb, du *dataUpdateDb) (err func (s sqliteStore) insertDataUpdateClientEntries(cd []clientDataDb, du dataUpdateDb) (err error) { for i := range cd { cd[i].DataUpdatesId = du.Id - err = s.db.Insert(&cd) + err = s.db.Insert(&cd[i]) if err != nil { return } |