hiling_go/db/migrations/000004_create_images_table.up.sql
2023-09-19 21:49:48 +07:00

9 lines
350 B
SQL

CREATE TABLE images(
id serial primary key not null,
image_url varchar not null,
uploaded_by integer references "users"("id") not null,
image_type varchar not null, -- Locations, Stories
image_of integer not null, -- Location_id, stories_id
created_at timestamp default (now()) not null,
updated_at timestamp default (now()) not null
);