diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-18 13:18:24 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-18 13:18:24 -0700 |
commit | 68c4324fc16dae18f4f599515283a566b541ef41 (patch) | |
tree | 679d119a924545f62da99b66e8a859d2c464455b /system/db/init.go | |
parent | 77f90cb5f1db80e8f94df905453beac6cee8022b (diff) |
adding sort buckets for each content type
Diffstat (limited to 'system/db/init.go')
-rw-r--r-- | system/db/init.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/system/db/init.go b/system/db/init.go index 2d73b35..58bb773 100644 --- a/system/db/init.go +++ b/system/db/init.go @@ -22,12 +22,17 @@ func Init() { } err = store.Update(func(tx *bolt.Tx) error { - // initialize db with all content type buckets + // initialize db with all content type buckets & sorted bucket for type for t := range content.Types { _, err := tx.CreateBucketIfNotExists([]byte(t)) if err != nil { return err } + + _, err = tx.CreateBucketIfNotExists([]byte(t + "_sorted")) + if err != nil { + return err + } } // init db with other buckets as needed |