add user activites

This commit is contained in:
nochill 2023-09-17 16:30:48 +07:00
parent 8861de969a
commit bf61b6c0ea
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1 @@
DROP TABLE IF EXISTS user_activities;

View File

@ -0,0 +1,10 @@
CREATE TABLE user_activities (
id serial primary key not null,
target_id integer not null, -- location_id, comment_id, stories_id
target varchar not null, -- locations, comments
action varchar not null, -- "comments on some stories with id, submmited a locations, submitted a stories"
link text,
comment text,
created_at timestamp default(now()) not null,
updated_at timestamp default(now()) not null
)