diff --git a/debian/changelog b/debian/changelog
index d5b895d2..8ce0ebea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-hedera-web (1.406.57) stable; urgency=low
+hedera-web (1.406.58) stable; urgency=low
* Initial Release.
diff --git a/forms/admin/access-log/ui.xml b/forms/admin/access-log/ui.xml
index 25c7fc28..33cd2340 100644
--- a/forms/admin/access-log/ui.xml
+++ b/forms/admin/access-log/ui.xml
@@ -43,9 +43,9 @@
SELECT u.stamp, a.platform, a.browser, a.version, a.javascript, a.cookies
FROM visitUser u
- JOIN visitAccess c ON c.id = u.access
- JOIN visitAgent a ON a.id = c.agent
- WHERE u.user = #user
+ JOIN visitAccess c ON c.id = u.accessFk
+ JOIN visitAgent a ON a.id = c.agentFk
+ WHERE u.userFk = #user
ORDER BY u.stamp DESC
LIMIT 8
diff --git a/forms/admin/connections/ui.xml b/forms/admin/connections/ui.xml
index 26731030..29a9ceb3 100644
--- a/forms/admin/connections/ui.xml
+++ b/forms/admin/connections/ui.xml
@@ -22,14 +22,14 @@
- SELECT vu.user userId, vu.stamp, u.nickname, s.lastUpdate,
+ SELECT vu.userFk userId, vu.stamp, u.nickname, s.lastUpdate,
a.platform, a.browser, a.version, u.name user
FROM userSession s
- JOIN visitUser vu ON vu.id = s.userVisit
- JOIN visitAccess ac ON ac.id = vu.access
- JOIN visitAgent a ON a.id = ac.agent
- JOIN visit v ON v.id = a.visit
- JOIN account.user u ON u.id = vu.user
+ JOIN visitUser vu ON vu.id = s.userVisitFk
+ JOIN visitAccess ac ON ac.id = vu.accessFk
+ JOIN visitAgent a ON a.id = ac.agentFk
+ JOIN visit v ON v.id = a.visitFk
+ JOIN account.user u ON u.id = vu.userFk
ORDER BY lastUpdate DESC
diff --git a/forms/admin/visits/ui.xml b/forms/admin/visits/ui.xml
index 291b6677..ae790c7f 100644
--- a/forms/admin/visits/ui.xml
+++ b/forms/admin/visits/ui.xml
@@ -51,18 +51,18 @@
- SELECT browser
- ,MIN(CAST(version AS DECIMAL(4,1))) minVersion
- ,MAX(CAST(version AS DECIMAL(4,1))) maxVersion
- ,MAX(c.stamp) lastVisit
- ,COUNT(DISTINCT c.id) visits
- ,SUM(a.firstAccess = c.id AND v.firstAgent = a.id) newVisits
+ SELECT browser,
+ MIN(CAST(version AS DECIMAL(4,1))) minVersion,
+ MAX(CAST(version AS DECIMAL(4,1))) maxVersion,
+ MAX(c.stamp) lastVisit,
+ COUNT(DISTINCT c.id) visits,
+ SUM(a.firstAccessFk = c.id AND v.firstAgentFk = a.id) newVisits
FROM visitUser e
- JOIN visitAccess c ON e.access = c.id
- JOIN visitAgent a ON c.agent = a.id
- JOIN visit v ON a.visit = v.id
- WHERE c.stamp BETWEEN TIMESTAMP(#from,'00:00:00') AND TIMESTAMP(#to,'23:59:59')
- GROUP BY browser ORDER BY visits DESC
+ JOIN visitAccess c ON c.id = e.accessFk
+ JOIN visitAgent a ON a.id = c.agentFk
+ JOIN visit v ON v.id = a.visitFk
+ WHERE c.stamp BETWEEN TIMESTAMP(#from,'00:00:00') AND TIMESTAMP(#to,'23:59:59')
+ GROUP BY browser ORDER BY visits DESC
diff --git a/package.json b/package.json
index 1c5bd75d..44eb6ed9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hedera-web",
- "version": "1.406.57",
+ "version": "1.406.58",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {