2017-12-01 05:07:10 -08:00
|
|
|
-- Table: public.videos
|
2017-11-29 19:49:26 -08:00
|
|
|
|
2017-12-01 05:07:10 -08:00
|
|
|
-- DROP TABLE public.videos;
|
2017-11-29 19:49:26 -08:00
|
|
|
|
2017-12-01 05:07:10 -08:00
|
|
|
CREATE TABLE public.videos
|
2017-11-29 19:49:26 -08:00
|
|
|
(
|
|
|
|
last_updated timestamp with time zone,
|
|
|
|
video_id text COLLATE pg_catalog."default" NOT NULL,
|
|
|
|
video_info text COLLATE pg_catalog."default",
|
|
|
|
video_html text COLLATE pg_catalog."default",
|
|
|
|
views bigint,
|
|
|
|
likes integer,
|
|
|
|
dislikes integer,
|
|
|
|
rating double precision,
|
2017-12-01 05:07:10 -08:00
|
|
|
CONSTRAINT videos_pkey PRIMARY KEY (video_id)
|
2017-11-29 19:49:26 -08:00
|
|
|
)
|
|
|
|
WITH (
|
|
|
|
OIDS = FALSE
|
|
|
|
)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
2017-12-01 05:07:10 -08:00
|
|
|
ALTER TABLE public.videos
|
2017-11-29 19:49:26 -08:00
|
|
|
OWNER to omar;
|
|
|
|
|
2017-12-01 05:07:10 -08:00
|
|
|
GRANT ALL ON TABLE public.videos TO kemal;
|
2017-11-29 19:49:26 -08:00
|
|
|
|
2017-12-01 05:07:10 -08:00
|
|
|
GRANT ALL ON TABLE public.videos TO omar;
|
2017-11-29 19:49:26 -08:00
|
|
|
|
2017-12-01 05:07:10 -08:00
|
|
|
-- Index: videos_video_id_idx
|
2017-11-29 19:49:26 -08:00
|
|
|
|
2017-12-01 05:07:10 -08:00
|
|
|
-- DROP INDEX public.videos_video_id_idx;
|
2017-11-29 19:49:26 -08:00
|
|
|
|
2017-12-01 05:07:10 -08:00
|
|
|
CREATE INDEX videos_video_id_idx
|
|
|
|
ON public.videos USING btree
|
2017-11-29 19:49:26 -08:00
|
|
|
(video_id COLLATE pg_catalog."default")
|
|
|
|
TABLESPACE pg_default;
|