added user independent sections and started db migration work
This commit is contained in:
parent
6a2dc8146c
commit
16ea95bf09
24 changed files with 622 additions and 122 deletions
11
pkg/db/db.go
11
pkg/db/db.go
|
|
@ -57,9 +57,18 @@ func New(cfg core.Config) (db *DB, err error) {
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
if db.SectionExists(core.WikiSection) != nil {
|
||||
err = db.CreateSection(core.WikiSection, []string{defUser}, false)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
_, err = db.CreatePage(core.IndexPage, core.WikiSection, welcome, defUser, core.Public)
|
||||
return
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return db.RunMigrations()
|
||||
}
|
||||
|
||||
func (db *DB) Dump(w io.Writer) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue