mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-18 11:46:23 -07:00
Add warning when migrating a SQLite database in-place
This commit is contained in:
parent
65d4dee673
commit
12350cc33f
1 changed files with 7 additions and 1 deletions
|
@ -95,8 +95,14 @@ func main() {
|
|||
Msg("Starting database migration")
|
||||
|
||||
config.InitConfig(versionStr)
|
||||
sqlCfg := config.GetSQLConfig()
|
||||
if migratingInPlace && sqlCfg.DBtype == "sqlite3" && !updateDB {
|
||||
common.LogWarning().
|
||||
Str("dbType", sqlCfg.DBtype).
|
||||
Bool("migrateInPlace", migratingInPlace).
|
||||
Msg("SQLite has limitations with table column changes")
|
||||
}
|
||||
if !migratingInPlace {
|
||||
sqlCfg := config.GetSQLConfig()
|
||||
err = gcsql.ConnectToDB(&sqlCfg)
|
||||
if err != nil {
|
||||
fatalEv.Err(err).Caller().Msg("Failed to connect to the database")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue