add sqlite usage warning [fix
@@ -19,6 +19,7 @@ func InitDatabase(databaseCfg *config.DatabaseType) database.Database {
case "sqlite", "sqlite3":
db = new(database.Sqlite)
err = db.Connect(databaseCfg.Sqlite)
+ printSqliteWraning()
}
if databaseCfg.Redis != nil && databaseCfg.Redis.Enable {
@@ -33,3 +34,12 @@ func InitDatabase(databaseCfg *config.DatabaseType) database.Database {
return db
}
+
+func printSqliteWraning() {
+ util.Log.Warning("--------------------------[ ATTENTION ]--------------------------")
+ util.Log.Warning("You are currently using SQLite as database driver. Please ONLY ")
+ util.Log.Warning("use SQLite during testing and debugging and NEVER use SQLite in a")
+ util.Log.Warning("real production environment! Here you can read about why: ")
+ util.Log.Warning("https://github.com/zekroTJA/shinpuru/wiki/No-SQLite-in-production")
+ util.Log.Warning("-----------------------------------------------------------------")
+}
