mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
- Prevent DBPassword from leaking to frontend (json:"-") - Make migration direction explicit via --direction flag, set dbType only after success - Use driver-appropriate DROP INDEX IF EXISTS for SQLite vs MariaDB - Build DSN with mysql.Config.FormatDSN() to prevent injection with special chars - Close DB before re-initialization in InitDB - Add migration tests (5 tests using SQLite in-memory DBs) - Parse JSON once in GetDBConfigFromJSON instead of 7 times - Use Go binary for dbType in shell script instead of fragile grep - Add rollback on failure in db_switch_to_sqlite - Validate DB settings in CheckValid |
||
|---|---|---|
| .. | ||
| model | ||
| db.go | ||
| db_test.go | ||
| migrate.go | ||
| migrate_test.go | ||