mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
DB: Add new view vw_log_history to show database logs in a better way
This commit is contained in:
3
sql/updates/auth/3.3.5/2019_06_06_00_auth.sql
Normal file
3
sql/updates/auth/3.3.5/2019_06_06_00_auth.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DROP VIEW IF EXISTS `vw_log_history`;
|
||||
|
||||
CREATE VIEW `vw_log_history` AS (SELECT FROM_UNIXTIME(MIN(`logs`.`time`)) AS `First Logged` ,FROM_UNIXTIME(MAX(`logs`.`time`)) AS `Last Logged` ,COUNT(*) AS `Occurrences` ,`realmlist`.`name` AS `Realm` ,`logs`.`type` ,`logs`.`level` ,`logs`.`string` FROM `logs` LEFT JOIN realmlist ON `logs`.`realm` = `realmlist`.`id` GROUP BY `logs`.`string`, `logs`.`type`, `logs`.`realm`);
|
||||
Reference in New Issue
Block a user