Commit c0f73d5e authored by Nigel Kukard's avatar Nigel Kukard

Merge branch 'nk-user-stats-update' into 'master'

IMPROVED: User stats update



See merge request !420
parents 029e240b a1e7d4c9
Pipeline #293 passed with stages
in 2 minutes and 56 seconds
......@@ -2,3 +2,4 @@ ALTER TABLE @PREFIX@users ADD COLUMN PeriodKey VARCHAR(255);
ALTER TABLE @PREFIX@users ADD COLUMN TotalTraffic @INT_UNSIGNED@;
ALTER TABLE @PREFIX@users ADD COLUMN TotalUptime @INT_UNSIGNED@;
ALTER TABLE @PREFIX@users ADD COLUMN NASIdentifier VARCHAR(255);
ALTER TABLE @PREFIX@users ADD COLUMN LastAcctUpdate DATETIME;
......@@ -74,7 +74,8 @@ sub init
PeriodKey = %{query.PeriodKey},
TotalTraffic = %{query.TotalTraffic},
TotalUptime = %{query.TotalUptime},
NASIdentifier = %{request.NAS-Identifier}
NASIdentifier = %{request.NAS-Identifier},
LastAcctUpdate = now()
WHERE
Username = %{user.Username}
';
......
......@@ -535,7 +535,8 @@ update_user_stats_query=<<EOT
PeriodKey = %{query.PeriodKey},
TotalTraffic = %{query.TotalTraffic},
TotalUptime = %{query.TotalUptime},
NASIdentifier = %{request.NAS-Identifier}
NASIdentifier = %{request.NAS-Identifier},
LastAcctUpdate = now()
WHERE
Username = %{user.Username}
EOT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment