Open pborissow opened 2 years ago
UserActivity model has been added. The following script will be required to update the database:
CREATE TABLE APPLICATION.USER_ACTIVITY (
ID BIGSERIAL NOT NULL,
USER_ID bigint NOT NULL,
HOUR integer NOT NULL,
MINUTE integer NOT NULL,
COUNT integer NOT NULL,
CONSTRAINT PK_USER_ACTIVITY PRIMARY KEY (ID)
);
ALTER TABLE APPLICATION.USER_ACTIVITY ADD FOREIGN KEY (USER_ID) REFERENCES APPLICATION.USER(ID)
ON DELETE CASCADE ON UPDATE NO ACTION;
CREATE INDEX IDX_USER_ACTIVITY_USER ON APPLICATION.USER_ACTIVITY(USER_ID);
ALTER TABLE APPLICATION.USER_ACTIVITY ADD CONSTRAINT unique_user_activity UNIQUE (USER_ID, HOUR, MINUTE);
Currently web activity is being logged in flat files on disk. It would be helpful for admins to generate usage reports.
Proposed tasks: