mirror of
https://github.com/documize/community.git
synced 2025-07-20 13:49:42 +02:00
fix offline mode
This commit is contained in:
parent
a8b0754393
commit
8c4455c5ca
2 changed files with 145 additions and 6 deletions
|
@ -19,6 +19,7 @@ import (
|
|||
"github.com/jmoiron/sqlx"
|
||||
|
||||
"github.com/documize/community/documize/database"
|
||||
"github.com/documize/community/documize/web"
|
||||
"github.com/documize/community/wordsmith/environment"
|
||||
"github.com/documize/community/wordsmith/log"
|
||||
"github.com/documize/community/wordsmith/utility"
|
||||
|
@ -68,6 +69,7 @@ func init() {
|
|||
}
|
||||
|
||||
// go into setup mode if required
|
||||
if web.SiteMode != web.SiteModeOffline {
|
||||
if database.Check(Db, connectionString) {
|
||||
if err := database.Migrate(true /* the config table exists */); err != nil {
|
||||
log.Error("Unable to run database migration: ", err)
|
||||
|
@ -76,6 +78,7 @@ func init() {
|
|||
} else {
|
||||
log.Info("database.Check(Db) !OK, going into setup mode")
|
||||
}
|
||||
}
|
||||
|
||||
return false // value not changed
|
||||
})
|
||||
|
|
136
documize/database/templates/offline.html
Normal file
136
documize/database/templates/offline.html
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue