diff --git a/db/migrations/000003_create_user_activities.down.sql b/db/migrations/000003_create_user_activities.down.sql new file mode 100644 index 0000000..8750d81 --- /dev/null +++ b/db/migrations/000003_create_user_activities.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS user_activities; \ No newline at end of file diff --git a/db/migrations/000003_create_user_activities.up.sql b/db/migrations/000003_create_user_activities.up.sql new file mode 100644 index 0000000..8fc1e37 --- /dev/null +++ b/db/migrations/000003_create_user_activities.up.sql @@ -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 +) \ No newline at end of file