2017-12-01 13:07:10 +00:00
|
|
|
-- Table: public.videos
|
2017-11-30 03:49:26 +00:00
|
|
|
|
2017-12-01 13:07:10 +00:00
|
|
|
-- DROP TABLE public.videos;
|
2017-11-30 03:49:26 +00:00
|
|
|
|
2017-12-01 13:07:10 +00:00
|
|
|
CREATE TABLE public.videos
|
2017-11-30 03:49:26 +00: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-30 21:44:09 +00:00
|
|
|
description text COLLATE pg_catalog."default",
|
2017-12-01 13:07:10 +00:00
|
|
|
CONSTRAINT videos_pkey PRIMARY KEY (video_id)
|
2017-11-30 03:49:26 +00:00
|
|
|
)
|
|
|
|
WITH (
|
|
|
|
OIDS = FALSE
|
|
|
|
)
|
|
|
|
TABLESPACE pg_default;
|
|
|
|
|
2017-12-01 13:07:10 +00:00
|
|
|
ALTER TABLE public.videos
|
2017-11-30 03:49:26 +00:00
|
|
|
OWNER to omar;
|
|
|
|
|
2017-12-01 13:07:10 +00:00
|
|
|
GRANT ALL ON TABLE public.videos TO kemal;
|
2017-11-30 03:49:26 +00:00
|
|
|
|
2017-12-01 13:07:10 +00:00
|
|
|
GRANT ALL ON TABLE public.videos TO omar;
|
2017-11-30 03:49:26 +00:00
|
|
|
|
2017-12-01 13:07:10 +00:00
|
|
|
-- Index: videos_video_id_idx
|
2017-11-30 03:49:26 +00:00
|
|
|
|
2017-12-01 13:07:10 +00:00
|
|
|
-- DROP INDEX public.videos_video_id_idx;
|
2017-11-30 03:49:26 +00:00
|
|
|
|
2017-12-01 13:07:10 +00:00
|
|
|
CREATE INDEX videos_video_id_idx
|
|
|
|
ON public.videos USING btree
|
2017-11-30 03:49:26 +00:00
|
|
|
(video_id COLLATE pg_catalog."default")
|
2017-12-30 21:44:09 +00:00
|
|
|
TABLESPACE pg_default;
|