feat: ✨ add post access usage metrics
This commit is contained in:
parent
eb87a78625
commit
94b65aec8c
3 changed files with 161 additions and 74 deletions
|
@ -26,6 +26,20 @@ CREATE TABLE posts (
|
|||
INDEX(post_path_depth, post_path)
|
||||
);
|
||||
|
||||
CREATE TABLE path_access_counts (
|
||||
post_path VARCHAR(255),
|
||||
agent VARCHAR(255),
|
||||
|
||||
path_last_access_time DATETIME NOT NULL
|
||||
DEFAULT CURRENT_TIMESTAMP
|
||||
ON UPDATE CURRENT_TIMESTAMP,
|
||||
|
||||
path_access_count INTEGER DEFAULT 0,
|
||||
path_processing_time DOUBLE PRECISION DEFAULT 0,
|
||||
|
||||
PRIMARY KEY(post_path, agent),
|
||||
INDEX(path_last_access_time)
|
||||
);
|
||||
|
||||
INSERT INTO posts (post_path, post_path_depth, post_metadata, post_content)
|
||||
VALUES (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue