NEW Show counter of access of website in website list

This commit is contained in:
Laurent Destailleur
2023-01-12 22:11:13 +01:00
parent dac735dc4b
commit 5bbfdbb775
6 changed files with 53 additions and 17 deletions

View File

@@ -59,3 +59,5 @@ INSERT INTO llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2
ALTER TABLE llx_user ADD COLUMN flagdelsessionsbefore datetime DEFAULT NULL;
ALTER TABLE llx_website ADD COLUMN pageviews_previous_month BIGINT UNSIGNED DEFAULT 0;

View File

@@ -36,9 +36,10 @@ CREATE TABLE llx_website
fk_user_modif integer,
date_creation datetime,
position integer DEFAULT 0,
lastaccess datetime NULL,
pageviews_month BIGINT UNSIGNED DEFAULT 0,
pageviews_total BIGINT UNSIGNED DEFAULT 0,
lastaccess datetime NULL, -- updated at each page access
pageviews_previous_month BIGINT UNSIGNED DEFAULT 0,
pageviews_month BIGINT UNSIGNED DEFAULT 0, -- increased by 1 at each page access, saved into pageviews_previous_month when on different month than lastaccess
pageviews_total BIGINT UNSIGNED DEFAULT 0, -- increased by 1 at each page access, no reset
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
import_key varchar(14) -- import key
) ENGINE=innodb;