mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-31 10:14:15 +00:00
setRemoteTrafficLocked merged last_online with MAX(last_online, ?), which is SQLite's two-argument scalar max. PostgreSQL's MAX() is aggregate-only, so node traffic sync failed every cycle with "function max(bigint, unknown) does not exist (SQLSTATE 42883)", flooding the logs. Add a dialect-aware database.GreatestExpr helper (GREATEST on Postgres, MAX on SQLite) and use it for the last_online merge. last_online is a non-null int64, so the two functions are semantically identical here. Closes #4633 |
||
|---|---|---|
| .. | ||
| model | ||
| db.go | ||
| db_seed_test.go | ||
| dialect.go | ||
| migrate_data.go | ||