From 93bd5fb3e9fb917b6ffd3d91fe24f07211008b6a Mon Sep 17 00:00:00 2001 From: nochill Date: Sun, 17 Sep 2023 16:30:19 +0700 Subject: [PATCH] add submmited by in tags --- db/migrations/000001_init_schema.up.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db/migrations/000001_init_schema.up.sql b/db/migrations/000001_init_schema.up.sql index 5317198..5219e7d 100644 --- a/db/migrations/000001_init_schema.up.sql +++ b/db/migrations/000001_init_schema.up.sql @@ -91,10 +91,10 @@ CREATE TABLE locations( CREATE TABLE tags ( "id" serial primary key not null, "name" varchar(50) not null, - "target_id" integer, - "tags_type" varchar(20), - "created_at" timestamp default(now()), - "updated_at" timestamp default(now()) + "submitted_by" integer references "users"("id") not null, + "target_id" integer, -- location_id, story_id + "tags_type" varchar(20), -- locations, stories + "approved_by" integer references "users"("id") not null ); CREATE TABLE location_images (