2022-10-06 05:54:04 +00:00
|
|
|
CREATE TABLE public.media (
|
|
|
|
kind character varying(5) NOT NULL,
|
2022-10-06 07:30:38 +00:00
|
|
|
filename character varying(55) NOT NULL,
|
2022-10-06 05:54:04 +00:00
|
|
|
user_id Integer NOT NULL,
|
|
|
|
created_utc integer NOT NULL,
|
|
|
|
size integer NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.media
|
|
|
|
ADD CONSTRAINT media_pkey PRIMARY KEY (kind, filename);
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public.media
|
|
|
|
ADD CONSTRAINT media_user_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
|