9 lines
350 B
MySQL
9 lines
350 B
MySQL
|
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
|
||
|
);
|