summaryrefslogtreecommitdiffstats
path: root/raddb/mods-config/sql/main
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:41:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:41:52 +0000
commit44eafeee62e6982131c62df6f74335114ca53024 (patch)
tree1cdf833b0a76e52630d717202398ced5900e11e9 /raddb/mods-config/sql/main
parentAdding upstream version 3.2.3+dfsg. (diff)
downloadfreeradius-upstream.tar.xz
freeradius-upstream.zip
Adding upstream version 3.2.5+dfsg.upstream/3.2.5+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'raddb/mods-config/sql/main')
-rw-r--r--raddb/mods-config/sql/main/mongo/queries.conf10
-rw-r--r--raddb/mods-config/sql/main/mssql/queries.conf2
-rw-r--r--raddb/mods-config/sql/main/mysql/extras/wimax/schema.sql2
-rw-r--r--raddb/mods-config/sql/main/mysql/process-radacct.sql2
-rw-r--r--raddb/mods-config/sql/main/postgresql/queries.conf2
5 files changed, 9 insertions, 9 deletions
diff --git a/raddb/mods-config/sql/main/mongo/queries.conf b/raddb/mods-config/sql/main/mongo/queries.conf
index 732e1e8..a496932 100644
--- a/raddb/mods-config/sql/main/mongo/queries.conf
+++ b/raddb/mods-config/sql/main/mongo/queries.conf
@@ -91,7 +91,7 @@ authorize_check_query = "db.${authcheck_table}.aggregate([ \
'op': ':=' \
} \
} \
-])" \
+])"
# TBD: fill in things here
authorize_reply_query = ""
@@ -150,7 +150,7 @@ accounting {
}, \
'$push': { \
'events_data': { \
- 'event_id': '%{sha256:%{tolower:%{Calling-Station-Id}', \
+ 'event_id': '%{sha256:%{tolower:%{Calling-Station-Id}}}', \
'event_type': 'Accounting-Start', \
'event_time': '%{Packet-Original-Timestamp}', \
'creation_date': { '$date': { '$numberLong': '%{expr: (%l * 1000) + (%M / 1000)}' } } \
@@ -202,7 +202,7 @@ accounting {
}, \
'$push': { \
'events_data': { \
- 'event_id': '%{sha256:%{tolower:%{Calling-Station-Id}', \
+ 'event_id': '%{sha256:%{tolower:%{Calling-Station-Id}}}', \
'event_type': 'Accounting-Interim-Update', \
'event_time': '%{Packet-Original-Timestamp}', \
'creation_date': { '$date': { '$numberLong': '%{expr: (%l * 1000) + (%M / 1000)}' } } \
@@ -214,7 +214,7 @@ accounting {
'closed': false, \
'creation_date': { '$date': { '$numberLong': '%{expr: (%l * 1000) + (%M / 1000)}' } } \
} \
- },
+ }, \
'upsert': true \
})"
# End Interim-Update
@@ -235,7 +235,7 @@ accounting {
}, \
'$push': { \
'events_data': { \
- 'event_id': '%{sha256:%{tolower:%{Calling-Station-Id}', \
+ 'event_id': '%{sha256:%{tolower:%{Calling-Station-Id}}}', \
'event_type': 'Accounting-Stop', \
'event_time': '%{Packet-Original-Timestamp}', \
'creation_date': { '$date': { '$numberLong': '%{expr: (%l * 1000) + (%M / 1000)}' } } \
diff --git a/raddb/mods-config/sql/main/mssql/queries.conf b/raddb/mods-config/sql/main/mssql/queries.conf
index 1978463..d83a27d 100644
--- a/raddb/mods-config/sql/main/mssql/queries.conf
+++ b/raddb/mods-config/sql/main/mssql/queries.conf
@@ -373,7 +373,7 @@ accounting {
UPDATE ${....acct_table1} \
SET \
AcctStartTime = ${....event_timestamp}, \
- AcctUpdateTime = ${....event_timestamp }, \
+ AcctUpdateTime = ${....event_timestamp}, \
AcctStartDelay = '%{%{Acct-Delay-Time}:-0}', \
ConnectInfo_start = '%{Connect-Info}' \
WHERE AcctUniqueId = '%{Acct-Unique-Session-ID}' \
diff --git a/raddb/mods-config/sql/main/mysql/extras/wimax/schema.sql b/raddb/mods-config/sql/main/mysql/extras/wimax/schema.sql
index e32224a..bc2e7da 100644
--- a/raddb/mods-config/sql/main/mysql/extras/wimax/schema.sql
+++ b/raddb/mods-config/sql/main/mysql/extras/wimax/schema.sql
@@ -3,7 +3,7 @@
# which replaces the "radpostauth" table.
#
-CREATE TABLE wimax (
+CREATE TABLE IF NOT EXISTS wimax (
id int(11) NOT NULL auto_increment,
username varchar(64) NOT NULL default '',
authdate timestamp NOT NULL,
diff --git a/raddb/mods-config/sql/main/mysql/process-radacct.sql b/raddb/mods-config/sql/main/mysql/process-radacct.sql
index 8902338..0696603 100644
--- a/raddb/mods-config/sql/main/mysql/process-radacct.sql
+++ b/raddb/mods-config/sql/main/mysql/process-radacct.sql
@@ -45,7 +45,7 @@
-- +----------------+----------------+-----------------+
-- 7 rows in set (0.000 sec)
--
-CREATE TABLE data_usage_by_period (
+CREATE TABLE IF NOT EXISTS data_usage_by_period (
username VARCHAR(64),
period_start DATETIME,
period_end DATETIME,
diff --git a/raddb/mods-config/sql/main/postgresql/queries.conf b/raddb/mods-config/sql/main/postgresql/queries.conf
index 18a1ed0..80953e0 100644
--- a/raddb/mods-config/sql/main/postgresql/queries.conf
+++ b/raddb/mods-config/sql/main/postgresql/queries.conf
@@ -534,7 +534,7 @@ accounting {
'%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}}', \
NULLIF('%{%{NAS-Port-ID}:-%{NAS-Port}}', ''), \
'%{NAS-Port-Type}', \
- ${....event_timestamp}, \
+ TO_TIMESTAMP(${....event_timestamp_epoch} - %{%{Acct-Session-Time}:-0}), \
${....event_timestamp}, \
NULL, \
%{%{Acct-Session-Time}:-NULL}, \